Skip to main content
ponderloop

LED Resistor Calculator

The resistor for an LED is the supply voltage minus the LED's forward voltage, divided by the current you want: R = (Vs − Vf) ÷ I. For a 9 V supply, a red LED at a typical 2 V and 20 mA that is (9 − 2) ÷ 0.02 = 350 Ω. That is not a standard value, so use the next E24 value up, 360 Ω (Orange, Blue, Brown, Gold), which gives 19.44 mA and dissipates 0.136 W, so a 1/2 W or larger resistor has a 2× margin. Only 22.2% of the supply power reaches the LED; the rest is heat in the resistor. Forward voltages here are typical figures, so check your LED's datasheet.

Updated Runs in your browser: nothing you enter is uploadedHow this tool works

Typical values only. Use your LED's datasheet figure if you have it.

Each string gets its own resistor.

Forward voltage is a typical value; your LED may differ, so check its datasheet. The actual current is an estimate.

9 V supply, 2 V LED, 20 mA, 1 in series

Use 360 Ω

4-band resistor for 360 Ω ±5%: orange, blue, brown, goldOrange3Blue6Brown×10Gold±5%
Exact resistor
350 Ω
Standard E24 value (at or above)
360 Ω
Color bands
Orange, Blue, Brown, Gold (4-band, ±5%)
Actual current per string
19.44 mA
Compared with your target
−2.78%
Voltage across the resistor
7 V
Resistor power (each)
0.136 W
Recommended rating (2×)
0.272 W, so 1/2 W or larger
Power in each LED
38.89 mW
Power in the LED
38.89 mW
Total current from the supply
19.44 mA
Power from the supply
175 mW
Efficiency (LED power ÷ supply power)
22.2%

The working

  1. Voltage across the resistor = supply − LEDs = 9 V − 1 × 2 V = 7 V.
  2. Exact resistor = 7 V ÷ 0.02 A = 350 Ω.
  3. Next E24 value at or above it: 360 Ω.
  4. Actual current = 7 V ÷ 360 Ω = 19.44 mA.
  5. Resistor power = 0.01944 A² × 360 Ω = 0.136 W; with a 2× margin, 0.272 W.
  6. Efficiency = LED power ÷ supply power = 38.89 mW ÷ 175 mW = 22.2%.

Typical LED forward voltage by color

Typical forward voltage at about 20 mA, the range seen across datasheets, and the E24 resistor for a 5 V supply at 20 mA. Typical values only: the same color differs between makers and parts.
ColorTypical VfRangeChip materialE24 resistor, 5 V and 20 mA
Infrared (940 nm)1.2 V1.1 to 1.6 VGaAs / AlGaAs200 Ω
Red2 V1.6 to 2.6 VAlInGaP / GaAsP150 Ω
Orange / amber2 V1.8 to 2.6 VAlInGaP150 Ω
Yellow2.1 V1.9 to 2.7 VAlInGaP / GaAsP150 Ω
Green (classic, GaP)2.2 V1.9 to 2.7 VGaP150 Ω
Green (bright, InGaN)3.2 V2.8 to 4.1 VInGaN91 Ω
Blue3.2 V2.8 to 4 VInGaN91 Ω
White3.2 V2.8 to 3.8 VInGaN + phosphor91 Ω
Ultraviolet (395 nm)3.6 V3.2 to 4.2 VInGaN75 Ω

Resistor for a red LED at 20 mA by supply voltage

A red LED at a typical 2 V and 20 mA, with the next E24 value at or above the exact result.
SupplyExact resistorE24 resistorActual currentResistor powerEfficiency
3.3 V65 Ω68 Ω19.12 mA0.0249 W60.6%
5 V150 Ω150 Ω20 mA0.06 W40%
9 V350 Ω360 Ω19.44 mA0.136 W22.2%
12 V500 Ω510 Ω19.61 mA0.196 W16.7%
24 V1.1 kΩ1.1 kΩ20 mA0.44 W8.33%

LEDs in series on 12 V (3.2 V each, 20 mA)

Putting LEDs in series shares one current and one resistor, so less of the supply is wasted. Four of these LEDs would need 12.8 V, which is more than the supply.
LEDs in seriesTotal LED voltageExact resistorE24 resistorEfficiency
13.2 V440 Ω470 Ω26.7%
26.4 V280 Ω300 Ω53.3%
39.6 V120 Ω120 Ω80%

How to calculate the resistor for an LED

  1. Enter the supply voltage. Type the voltage that drives the LED and its resistor. The example is a 9 V battery. The supply must be higher than the LEDs' total forward voltage, otherwise the tool shows an error.
  2. Pick the LED color or type its forward voltage. Choosing a color fills in its typical forward voltage (red is 2 V). If you have the datasheet, type its forward voltage at your current instead, because typical values vary between parts.
  3. Enter the forward current. Type the current in milliamps. Indicator LEDs are often run at 10 to 20 mA or less; do not exceed the maximum continuous current on the datasheet. The example is 20 mA.
  4. Set the number of LEDs in series and parallel strings. LEDs in series share one current and add their voltages. Each parallel string needs its own resistor, because LEDs do not share current evenly. The 12 V example with 3 white LEDs in series and 2 strings needs 2 (one per string) of 120 Ω.
  5. Read the result. Use the standard value at or above the exact one, so the current never goes above your target. The example is 350 Ω exactly, so 360 Ω, with 19.44 mA and bands Orange, Blue, Brown, Gold.

Frequently asked questions

How do I calculate the resistor for an LED?
Subtract the LED's forward voltage from the supply voltage and divide by the current in amps: R = (Vs − Vf) ÷ I. For 9 V, 2 V and 20 mA, that is 7 V ÷ 0.02 A = 350 Ω. The resistor drops the voltage the LED does not use.
Why use the next higher standard resistor value?
Resistors are made in E-series values, and a higher resistance gives a slightly lower current, which is the safe direction. With 350 Ω needed, the next E24 value is 360 Ω, giving 19.44 mA (−2.78%) instead of 20 mA. The LED is a little dimmer, never overdriven.
What is the forward voltage of an LED?
It depends on the chip material and so on the color. Typical figures at about 20 mA are 1.2 V for infrared, 2.0 V for red and orange, 2.1 V for yellow, and around 3.2 V for blue, white and bright green. Datasheets give ranges: Vishay lists 2.0 V typical and 2.6 V maximum for its red and orange AlInGaP parts. These are typical values, so use the datasheet of your actual LED when you have it.
Which E-series should I choose, E12 or E24?
E24 has 24 values per decade (±5%) and E12 has 12 (±10%). E24 sits closer to the exact value, so it gets nearer to your target current. In the example, E24 gives 360 Ω and E12 gives 390 Ω, with 17.95 mA. The tolerance also moves the real current by a few percent.
How do I wire several LEDs?
In series, the forward voltages add and one resistor sets the current for the chain: three 3.2 V LEDs on 12 V need (12 − 9.6) ÷ 0.02 = 120 Ω, giving 120 Ω and 80% efficiency. In parallel, give every string its own resistor: LEDs differ slightly in forward voltage, so one shared resistor can let one LED hog the current. Two such strings draw 40 mA in total.
What power rating does the resistor need?
The resistor dissipates P = I² × R, which is also the voltage across it times the current. The example resistor dissipates 0.136 W. The tool doubles that for a margin (0.272 W, so 1/2 W or larger) and rounds up to a standard rating such as 1/8 W, 1/4 W or 1/2 W.
What happens if the supply is lower than the LED voltage?
No useful current flows: the LED never reaches its forward voltage, so there is nothing for a resistor to limit and the tool shows an error. For example: The supply (3 V) must be higher than the LEDs' total forward voltage (1 × 3.2 V = 3.2 V), or no current flows. Raise the supply or use fewer LEDs in series. Even when the supply is only a little higher, the current becomes very sensitive to the LED's actual forward voltage, so the tool warns when less than 1 V is left for the resistor.
Why is the efficiency so low?
A series resistor turns the unused voltage into heat. The LED gets Vf × I and the supply provides Vs × I, so efficiency is Vf ÷ Vs: 22.2% for 2 V from 9 V, and 40% from 5 V. Putting more LEDs in series, or using a constant-current driver, wastes less.
Are my numbers sent anywhere?
No. The calculation runs in your browser and nothing you type is sent to a server or saved.

How it works

The voltage across the resistor is the supply minus the number of LEDs in series times the forward voltage. The exact resistance is that voltage divided by the current in amps. The standard value is the smallest E12 or E24 value (IEC 60063) at or above the exact one, using the same lists as the resistor color code tool, so the current never exceeds your target. The actual current is the resistor voltage divided by the standard value, power in the resistor is current squared times resistance, and the recommended rating is twice that, rounded up to a standard wattage (1/16, 1/8, 1/4, 1/2, 1, 2, 3, 5 or 10 W). LED power is forward voltage times current; efficiency is the power in all LEDs divided by the power taken from the supply. With parallel strings, each string has its own resistor and the supply current is the string current times the number of strings. The forward voltage is a typical figure and is assumed constant: a real LED varies from part to part and with current and temperature, so the actual current is an estimate, and resistor tolerance (±5% or ±10%) adds to that. Supply voltages above 100 V, currents above 1 A and more than 50 LEDs in series are outside the range of this tool. Everything runs in your browser and nothing you type is sent anywhere.

Sources

All measure & buildAll toolsHome & DIY calculators