Skip to main content
Preparing workspace

LED Resistor Calculator

Find the series resistor for one LED or a string: R = (Vs − n·Vf) ÷ I, rounded up to a standard E-series value, with real current and resistor wattage.

Still loading. If the tool doesn’t appear, reload this page.

About this tool

LED Resistor Calculator

Work out the series resistor for one LED or a string of LEDs from supply voltage, forward voltage and current, with the standard value and wattage.

An LED resistor calculator finds the series resistor that sets an LED's current: R = (supply voltage − total forward voltage) ÷ current. One LED with a 2 V forward voltage at 20 mA on 5 V needs (5 − 2) ÷ 0.02 = 150 Ω. It rounds up to a standard value and shows the resistor's wattage.

How to use LED Resistor Calculator

  1. 1

    Enter the supply voltage, then the LED's forward voltage and current from its datasheet (the forward voltage at the current you plan to run).

  2. 2

    Set how many LEDs share one resistor in series, and how many such strings run in parallel — each string gets its own resistor.

  3. 3

    Read the exact resistance, the standard value rounded up in the series you chose, the real current it gives and the resistor wattage to buy with your safety margin.

Why use LED Resistor Calculator

  • Rounds the safe way

    The standard value is always the next one up, so at its nominal resistance the current never exceeds what you asked for.

  • Power and wattage included

    Shows I²R in the resistor and the smallest common rating at your chosen margin.

  • Warns about low supplies

    Tells you when the LEDs' total forward voltage meets or exceeds the supply, and how many would fit.

LED resistor values at 20 mA

Computed by this calculator for one LED at 20 mA, rounding up to E12 values. 2 V and 3 V are example forward voltages; use your LED's datasheet figure.
SupplyLED forward voltageExact resistorStandard (E12, rounded up)Real current, resistor power
3.3 V2 V65 Ω68 Ω19.1 mA, 24.9 mW
5 V2 V150 Ω150 Ω20 mA, 60 mW
9 V2 V350 Ω390 Ω17.9 mA, 126 mW
12 V2 V500 Ω560 Ω17.9 mA, 179 mW
24 V2 V1.1 kΩ1.2 kΩ18.3 mA, 403 mW
3.3 V3 V15 Ω15 Ω20 mA, 6 mW
5 V3 V100 Ω100 Ω20 mA, 40 mW
9 V3 V300 Ω330 Ω18.2 mA, 109 mW
12 V3 V450 Ω470 Ω19.1 mA, 172 mW
24 V3 V1.05 kΩ1.2 kΩ17.5 mA, 368 mW

Power is I² × R in the resistor. Buy a rating comfortably above it; the calculator applies your margin (2× by default).

Common use cases

  • Pick the resistor for an indicator LED on a 5 V microcontroller pin or a 12 V panel.
  • Plan a string of three LEDs on 12 V and see how much power the resistor wastes.
  • Check whether a 3.3 V supply leaves enough headroom for a blue or white LED.
  • Choose a resistor wattage with a safety margin instead of guessing ¼ W.

Frequently asked questions

How do I calculate the resistor for an LED?

Subtract the LED's forward voltage from the supply and divide by the current in amps: R = (Vs − Vf) ÷ I. With 5 V, a 2 V LED and 20 mA, that is 3 ÷ 0.02 = 150 Ω. For LEDs in series, use the sum of their forward voltages.

Should I round the LED resistor up or down?

Round up to the next standard value, because a larger resistor gives slightly less current, never more. 9 V with a 2 V LED at 20 mA needs 350 Ω; the next E24 value is 360 Ω (about 19.4 mA), or 390 Ω in E12 (about 17.9 mA).

What wattage resistor do I need for an LED?

Work out P = I² × R and choose a rating comfortably above it. 20 mA through 150 Ω is 0.02² × 150 = 0.06 W, so even a ⅛ W resistor has a 2× margin; at 24 V the same LED's 1.2 kΩ resistor dissipates about 0.4 W, so ½ W is the minimum and 1 W gives a 2× margin.

Can several LEDs share one resistor in parallel?

It is better not to. LEDs' forward voltages differ slightly, so in parallel the lowest-voltage LED takes more than its share of the current. Give each LED, or each series string, its own resistor; the calculator counts them for you.

What happens if the supply voltage is lower than the LED forward voltage?

The LED will not light properly, and no resistor value can fix it, because the resistor needs some voltage left over to set the current. Use fewer LEDs in series or a higher supply; the calculator shows the most LEDs that fit.

Where do I find an LED's forward voltage?

On its datasheet, usually listed as VF at a test current such as 20 mA. It varies with colour, chemistry and current, so use the datasheet's typical figure at the current you will run.

Embed this tool on your site

Add the LED Resistor Calculator widget to your blog or website — free, responsive, no signup. Just keep the “Widget by AltFTool” credit link visible.

<iframe src="https://www.altftool.com/embed/widget/led-resistor-calculator"
  title="LED Resistor Calculator — free AltFTool widget"
  width="100%" height="640" style="border:0;border-radius:12px;overflow:hidden"
  loading="lazy" referrerpolicy="no-referrer-when-downgrade" allow="clipboard-write"></iframe>
<p style="font-size:12px;margin:4px 0 0">Widget by <a href="https://www.altftool.com/tools/all/led-resistor-calculator?utm_source=embed&utm_medium=widget" rel="nofollow">AltFTool — free online tools</a></p>

Browse all embeddable widgets →