Skip to content
Press Equals

How to choose a resistor for an LED

Ohm's law for LED resistors, rounding up to a standard value, the wattage you need, and one resistor for several LEDs in series.

Open the LED Resistor calculator

An LED needs a resistor in series to limit its current. Work it out with Ohm's law: resistance = (supply voltage − LED forward voltage) ÷ current, with the current in amps. A 2 V LED at 20 mA on 5 V needs (5 − 2) ÷ 0.02 = 150 Ω.

The formula

R = (V supply − V LED) ÷ I

Take the forward voltage and the current from the LED's datasheet. Convert milliamps to amps by dividing by 1,000: 20 mA is 0.02 A.

5 V supply, 2 V LED, 20 mA: (5 − 2) ÷ 0.02 = 150 Ω. The resistor turns 3 V × 0.02 A = 0.06 W into heat, so a 1/8 W resistor leaves twice that as margin.

When the answer isn't a standard value

Resistors come in standard values. When the answer falls between two, use the next one up: a slightly higher resistance means slightly less current, which is safe.

12 V supply, 3.2 V LED, 20 mA: (12 − 3.2) ÷ 0.02 = 440 Ω. The next standard value up is 470 Ω, which lets 18.7 mA through. The resistor drops 8.8 V, so it needs a 1/2 W rating.

Several LEDs in series

LEDs in a series string share the same current, so add up their forward voltages and subtract the total from the supply.

Three 3.2 V LEDs on 12 V: (12 − 9.6) ÷ 0.02 = 120 Ω. One resistor serves the whole string, and it wastes far less power than three separate ones would.

The forward voltages must add up to less than the supply, or the string won't light.

Work it out

Enter your supply, LED and current in the LED resistor calculator. It picks the standard resistor and the wattage for you. For other circuits, the Ohm's law calculator solves for any of voltage, current or resistance.

Updated

All guides by topic