LED Resistor Calculator

The resistor drops the extra voltage so the LED current stays near the value you choose.

Typical forward voltages. Replace them with the value from the LED datasheet.

Series resistor
350 Ω
Power in the resistor
140 mW

(9 V − 2 V) / 20 mA = 350 Ω

The nearest E24 resistor is 360 Ω. With that part the LED current is 19.44 mA, 2.8% from the 20 mA you entered.

Power in that E24 resistor is 136.1 mW.

LED resistor examples

Calculated the same way as the tool above.

9 V supply, 2 V LED, 20 mA

(9 V − 2 V) / 20 mA gives 350 Ω. The nearest E24 resistor is 360 Ω. With that part the LED current is 19.44 mA and the resistor dissipates 136.1 mW.

White LED from a 5 V supply

A white LED at 3.2 V and 10 mA, on 5 V, needs 180 Ω. That resistance is already an E24 value, so the current stays at 10 mA and the resistor dissipates 18 mW.

LED resistor formula

R = (Vs − Vf) / I. Enter current in milliamps; the calculation uses amperes. Power in the resistor is (Vs − Vf) × I, which is the same as I² × R.

Questions about LED resistors

Which resistor does an LED need?
Subtract the LED forward voltage from the supply, then divide by the current you want. A 9 V supply, a red LED at 2 V, and 20 mA needs (9 − 2) / 0.02 = 350 Ω.
Why does the nearest standard value change the current?
Stock resistors come in preferred values. A higher resistance passes less current, and a lower one passes more. The page recalculates the current for the nearest E24 part.
How large a power rating do I need?
The resistor turns the leftover voltage into heat. Choose a power rating above the number shown, with some margin. The color buttons only fill in typical forward voltages; the datasheet value is the one that belongs in the field.