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. It also snaps the answer to the nearest E12 preferred value you can actually buy and reports the power the resistor will dissipate. A classic 5 V rail driving a 2 V red LED at 20 mA needs a 150 ohm resistor burning about 0.06 W.

How to size an LED resistor

  1. Enter the supply voltage powering the circuit in the Supply voltage field, such as 5 or 12.
  2. Enter the LED forward voltage from its datasheet, often around 2 V for a red LED.
  3. Enter the target current in milliamps in the LED current field, commonly 20 mA.
  4. Read the exact resistor value, the nearest E12 stocked value and the power the resistor dissipates.
  5. Use Copy to save the resistance, E12 value and power as text.

Examples

5V supply, red LED

Vs = 5 V, Vf = 2 V, I = 20 mA
R = 150 ohm, nearest E12 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, P = 0.2 W

5V supply, blue LED

Vs = 5 V, Vf = 3.2 V, I = 20 mA
R = 90 ohm, nearest E12 82 ohm, P = 0.036 W

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, so 3 V across the resistor gives 150 ohm.

What is the forward voltage of an LED?

It depends on colour. Red is around 1.8 to 2.2 V, yellow and green a little higher, while blue and white are typically 3.0 to 3.4 V. Use the exact value from your LED's datasheet for the best result.

What is the nearest E12 value?

E12 is a standard series of resistor values with 12 steps per decade at 10 percent tolerance. The tool picks the closest stocked value on a log scale, so an exact 500 ohm result maps to 470 ohm.

How is the power figure calculated?

From P = I^2 x R using the current in amps and the exact resistance, which equals the voltage across the resistor times the current. At 20 mA and 150 ohm that is about 0.06 W.

Why does the resistor power rating matter?

The resistor turns the excess voltage into heat, so pick a part rated comfortably above the power shown. A common 0.25 W resistor is plenty for a single small indicator LED.

Why must the supply exceed the forward voltage?

If the supply is at or below the LED forward voltage there is no voltage left for the resistor, so no positive value can set the current. The tool rejects that input rather than return a meaningless number.

How do I size a resistor for several LEDs?

For LEDs in series, add their forward voltages and enter the total as Vf, keeping the same current. For separate branches, size a resistor for each branch, since paralleling one resistor across several LEDs is unreliable.

Should I round the resistor up or down?

The tool reports the nearest E12 value, but choosing the next value up is safer because it lowers the current slightly and protects the LED. A value down raises current and brightness but adds heat.

Does this run online or send my values anywhere?

It runs entirely in your browser. The voltages and current you enter are never uploaded or stored, so the calculation stays completely local.

Learn more

Related tools