Boneyard Tools

LED Series Resistor Calculator

Enter your supply voltage, the LED's forward voltage and the current you want, and this calculator returns the series resistor value using R = (Vs - Vf) / I.

How to size an LED resistor

  1. Enter the supply voltage powering the circuit.
  2. Enter the LED forward voltage from its datasheet, often around 2 V.
  3. Enter the target current in milliamps, commonly 20 mA, and read the resistor value.

Examples

5V supply, red LED

Vs = 5 V, Vf = 2 V, I = 20 mA
R = 150 ohm, P = 0.06 W

12V supply, red LED

Vs = 12 V, Vf = 2 V, I = 20 mA
R = 500 ohm, nearest E12 470 ohm

Frequently asked questions

How do I calculate an LED resistor?

Subtract the LED forward voltage from the supply voltage, then divide by the current in amps: R = (Vs - Vf) / I. A 20 mA current is 0.02 A.

What is the forward voltage of an LED?

It depends on color. Red is around 1.8 to 2.2 V, while blue and white are typically 3.0 to 3.4 V. Use the value from your LED's datasheet.

What is the nearest E12 value?

E12 is a standard series of resistor values with 12 steps per decade. The calculator shows the closest stocked value to the exact result.

Why does the resistor power rating matter?

The resistor dissipates power as heat (P = I^2 x R). Pick a resistor rated above this, often a 0.25 W part is enough for small LEDs.

Why must the supply exceed the forward voltage?

If the supply is at or below the LED forward voltage, no positive resistor value can set the current, so that input is rejected.

Related tools