LED Resistor Calculator

Find the current-limiting resistor for your LEDs, the standard value to buy, and the power rating it needs.

LED resistor formula

The resistor has to drop the voltage that the LEDs do not use. With n LEDs in series, R = (Vs − n × Vf) ÷ I, where Vs is the supply voltage, Vf is the forward voltage of one LED and I is the LED current in amps. The resistor's power is P = I² × R.

Worked example: red LED on a 9 V battery

A red LED with a forward voltage of 2 V should run at 20 mA. The resistor must drop 9 − 2 = 7 V, so R = 7 ÷ 0.02 = 350 Ω. The next E12 value up is 390 Ω, which gives a current of 7 ÷ 390 = 17.9 mA. The resistor dissipates about 0.126 W, so a 0.5 W resistor gives a safe margin (a 0.25 W part would run close to its limit).

Typical LED forward voltages

These are typical figures. The exact forward voltage depends on the LED and the current, so use the datasheet value when you have it.

Frequently Asked Questions

Related tools: Ohm's Law Calculator and Resistor Colour Code Calculator.