LED resistor calculator

Enter the supply, the LED forward voltage and current from its datasheet, and how many LEDs are in series. You get the exact resistor, the next-higher standard value and its power rating.

VC-19 LED resistorR = (Vs − n·Vf) / I
V
V
From the datasheet
mA
20 mA typical for 5 mm LEDs
Resistor150Ω
Exact 135 ΩE12 150 ΩActual current 18 mADissipation 48.6 mW → use 0.125 WEfficiency 78%

Why an LED needs a resistor

An LED isn't a resistor. Above its forward voltage, current rises very steeply, so connecting it straight to a supply lets it draw as much as the supply can give until it burns out. The series resistor sets the current.

R = (Vsupply − n × Vf) ÷ I

Example: three white LEDs (3.1 V each) at 20 mA from 12 V: R = (12 − 9.3) ÷ 0.02 = 135 Ω. Round up to 150 Ω (E12/E24), giving 18 mA and 49 mW in the resistor, so a ¼ W part is plenty.

Series strings vs parallel

Put LEDs in series with one resistor where the supply allows. For parallel strings give each string its own resistor. Sharing one resistor between parallel LEDs lets the one with the lowest forward voltage hog the current.

The resistor wattage suggested here is at least twice the calculated dissipation, a common derating margin.

Questions people ask

What is the LED resistor formula?

R = (Vsupply − n × Vf) ÷ I, where n is the number of LEDs in series and I is the LED current in amps.

What forward voltage should I use?

Use the datasheet. Typical values: red about 1.8–2.2 V, yellow/green (older types) about 2.0–2.2 V, blue, white and true green about 2.8–3.4 V.

Why round the resistor up?

Rounding up to the next standard value keeps the current at or below the target. Rounding down pushes more current through the LED than you designed for.