LED Current-Limiting Resistor: How to Calculate It Correctly

A light-emitting diode is a diode, not a lamp. Once the voltage across it reaches its forward voltage, current rises very steeply for a tiny increase in voltage. Connect an LED straight across a 5 V supply and it will draw far more than it can handle and burn out, sometimes instantly. The fix is a series resistor that sets the current. This article shows how to calculate that resistor for single LEDs and strings, how to check its power rating, and what to do on low supply voltages.

How the Resistor Sets the Current

In a series loop of supply, resistor and LED, the LED holds an almost constant forward voltage Vf. The rest of the supply voltage appears across the resistor, and Ohm's law applied to the resistor gives the current.

R = (Vs - Vf) / I_LED
P_R = (Vs - Vf) x I_LED = I_LED^2 x R
For n LEDs in series:  R = (Vs - n x Vf) / I_LED

Vf depends on the LED colour (the semiconductor material) and changes a little with current and temperature. Always use the datasheet value when you have one. The table gives typical ranges for standard 5 mm indicator LEDs.

ColourTypical VfCommon test current
Infrared1.2 to 1.5 V20 mA
Red1.8 to 2.2 V20 mA
Yellow / orange2.0 to 2.2 V20 mA
Green (older GaP)2.0 to 2.4 V20 mA
Green (bright InGaN)2.8 to 3.4 V20 mA
Blue / white2.8 to 3.4 V20 mA

The absolute maximum continuous current for a standard 5 mm LED is commonly 20 to 30 mA, but modern LEDs are bright enough at 5 to 10 mA for indicator use. Running at lower current also increases LED life and reduces resistor heat.

Worked Examples

Example 1: Red LED on 5 V at 10 mA

R = (5 - 2.0) / 0.010 = 300 Ω  -> nearest E12 above: 330 Ω
Actual I = (5 - 2.0) / 330 = 9.1 mA
P_R = 3.0 x 0.0091 = 0.027 W   -> 1/4 W resistor is fine

Rounding to the next higher standard value keeps current slightly below the target, which is the safe direction.

Example 2: White LED on 12 V at 20 mA

R = (12 - 3.2) / 0.020 = 440 Ω  -> use 470 Ω
Actual I = 8.8 / 470 = 18.7 mA
P_R = 8.8 x 0.0187 = 0.165 W

0.165 W is two-thirds of a 1/4 W rating, so the resistor will be noticeably warm. Use a 1/2 W resistor. Notice that 8.8 V of the 12 V, about 73% of the input power, is wasted as heat in the resistor.

Example 3: Three white LEDs in series on 12 V

Total Vf = 3 x 3.2 = 9.6 V
R = (12 - 9.6) / 0.020 = 120 Ω
P_R = 2.4 x 0.020 = 0.048 W
Efficiency gain: the resistor now wastes 2.4 V instead of 8.8 V

Series strings are far more efficient, but leave enough headroom. Here only 2.4 V is across the resistor. If the LEDs' actual Vf is 3.4 V each (10.2 V total), current drops to (12 - 10.2) / 120 = 15 mA. If the supply is a car battery that swings from 12 V to 14.4 V, current rises to (14.4 - 9.6) / 120 = 40 mA, which is too much. In such cases, either increase the resistor so the high-voltage case is safe, or use a constant-current driver.

Example 4: Blue LED on a 3.3 V logic output

With Vf of 3.0 V there is only 0.3 V for the resistor, and the logic output itself sags under load. Current will be low and unpredictable. Use a red or yellow LED on 3.3 V outputs, or drive the blue LED from 5 V through a transistor.

Example 5: Measuring the real current

You can check any of these designs without breaking the circuit. Measure the voltage across the resistor with a multimeter and divide by its measured resistance. If 2.95 V appears across a 330 Ω resistor, the LED current is 2.95 / 330 = 8.9 mA. This method also reveals the LED's actual forward voltage: subtract the resistor voltage from the supply voltage you measure at the same moment.

Why Not Share One Resistor Between Parallel LEDs?

Two LEDs in parallel sharing one resistor will not share current equally. The one with slightly lower Vf takes more current, heats up, its Vf falls further, and it takes even more. The result is uneven brightness and early failure of one LED, after which the other receives all the current. Give each LED, or each series string, its own resistor.

Troubleshooting

  • LED does not light: it may be reversed. The longer leg is the anode, and the flat edge on the rim marks the cathode. Check with the multimeter diode test.
  • LED very dim: check the resistor value with the colour code; a 33 kΩ fitted instead of 330 Ω gives about 100 times less current.
  • LED flashes and dies: there was no resistor, or the resistor was bypassed by a solder bridge.
  • Resistor too hot to touch: recalculate power and move to a higher wattage or a series string.
  • Brightness varies with supply: use more voltage headroom across the resistor or a constant-current source.

Summary

Find the LED's forward voltage, choose a current (5 to 20 mA for indicators), compute R = (Vs - Vf) / I, round up to a standard value and check resistor power. Put LEDs in series to save energy, but keep enough voltage across the resistor to absorb supply and Vf variations. Never parallel LEDs on one resistor, and never connect an LED directly across a supply.