LED Resistor Calculator

In short: series resistor R = (supply voltage − LED forward voltage) / LED current. A red LED (2.1 V, 20 mA) on 5 V needs (5 − 2.1) V / 0.02 A = 145 Ω, so use the standard value 150 Ω. The calculator always rounds up so the current never ends up too high.

Source: IEC 60063:2015, IEC 60063:2015 – Preferred number series for resistors and capacitors (E12, E24). Updated: .

V
Typical datasheet values – your LED’s datasheet has the exact figure
mA
Standard LEDs: usually 20 mA, 5–10 mA is often bright enough
for “series”: all on one resistor
My ToolboxYour inputs are saved in this browser only.

Result

Resistor
150 Ω (E24, at least 0.125 W) · calculated 145 Ω
Summary
QuantityValue
Calculated resistance145 Ω
Next E24 value (rounded up)150 Ω → 19.33 mA
Next lower E24 value130 Ω → 22.31 mA
Voltage across the resistor2.9 V
Power dissipated in the resistor56.1 mW
Recommended resistor rating0.125 W
LED power40.6 mW
Share of power used by the LEDs42 %
Step by step
  • Forward voltage: V_F = 2.1 V (typical datasheet value for red)
  • Voltage across the resistor: V_R = V_s − n · V_F = 5 V − 1 · 2.1 V = 2.9 V
  • Resistance: R = V_R / I = 2.9 V / 0.02 A = 145 Ω
  • Round up to the next E24 value: 150 Ω → I = 2.9 V / 150 Ω = 19.33 mA
  • Power: P = V_R · I = 2.9 V · 0.01933 A = 56.1 mW → use a resistor rated at least 0.125 W (2× margin)
V_F varies by type and batch (per datasheet at 20 mA e.g. red typ. 2.1 V but up to 2.6 V; white typ. 3.2 V, up to 4.0 V) – use the value from your LED’s datasheet.

How it is calculated

LED resistor formula

An LED is not a resistor: above its forward voltage V_F the current rises steeply, so a series resistor has to limit it. By Kirchhoff’s voltage law the remaining voltage drops across the resistor, and Ohm’s law gives:

R = (V_s − n · V_F) / I_F  ·  power P = (V_s − n · V_F) · I_F

n is the number of LEDs in series. The result is rounded up to the next standard value of the E series (IEC 60063) – a slightly larger resistor means slightly less current, which is the safe side for the LED.

Examples

CircuitCalculationStandard value
1 red LED on 5 V, 20 mA(5 − 2.1) / 0.02 = 145 Ω150 Ω, 58 mW
1 white LED on 5 V, 20 mA(5 − 3.2) / 0.02 = 90 Ω91 Ω (E24) / 100 Ω (E12)
3 white LEDs in series on 12 V(12 − 9.6) / 0.02 = 120 Ω120 Ω, 48 mW
1 red LED on 24 V, 20 mA(24 − 2.1) / 0.02 = 1095 Ω1.1 kΩ, 0.44 W → 1 W resistor

Series or parallel?

In series the same current flows through every LED, one resistor is enough and less energy is wasted – but the sum of the forward voltages must stay below the supply voltage. LEDs in parallel each need their own resistor: forward voltages vary, and on a shared resistor the LED with the lowest V_F would hog most of the current.

Typical forward voltages

From datasheets of common 5 mm LEDs (Cree C503B family, at 20 mA): red and amber typically 2.1 V (max. 2.6 V); blue, InGaN green and white typically 3.2 V (max. 4.0 V). Older GaP green LEDs are around 2.2 V. Always prefer the figure from your own LED’s datasheet.

Limitations

A resistor is the simplest current limiter for small currents. For high-power LEDs (350 mA and up) or fluctuating supplies such as a car’s 12 V system, a constant-current driver is the better choice. Never run LEDs with just a resistor straight from mains voltage – the resistor would dissipate several watts and the circuit is dangerous to touch.

Frequently asked questions

How do I calculate the resistor for an LED?

Subtract the LED’s forward voltage from the supply voltage and divide by the current: R = (V_s − V_F) / I. Example: (12 V − 2.1 V) / 0.02 A = 495 Ω; use the next higher standard value, 510 Ω (E24).

What resistor do I need for an LED on 5 V?

At 20 mA: 150 Ω for red or yellow LEDs (2.1 V) and 91–100 Ω for white, blue or green ones (3.2 V). At 10 mA the values double and the LED is a little dimmer – often plenty for an indicator, e.g. on an Arduino pin.

What resistor for LEDs on 12 V?

One red LED at 20 mA: (12 − 2.1) / 0.02 = 495 Ω → 510 Ω. Three white LEDs in series are more efficient: (12 − 9.6) / 0.02 = 120 Ω, because less voltage is wasted in the resistor.

Can parallel LEDs share one resistor?

It is better not to. Forward voltages differ slightly, so on a shared resistor the LED with the lowest voltage takes most of the current and wears out faster. Give each LED its own resistor.

What wattage should the LED resistor be?

The resistor dissipates P = V_R · I. A 2× margin is common practice: 58 mW is fine with a 1/8 W part, 0.44 W calls for a 1 W resistor.

Can I run an LED without a resistor?

Only from a constant-current source or when the circuit limits current in another way. On a fixed voltage, even a tenth of a volt too much can push the current high enough to destroy the LED.

Sources and legal basis

As of:

Related tools