The formula
is the supply voltage, the LED’s forward voltage, the number of LEDs in series, the LED current and the power the resistor turns into heat.
Where it comes from
An LED isn’t like a light bulb. Once the voltage across it reaches its forward voltage, its current shoots up with almost no extra voltage. Connected straight to a battery, it would draw as much current as the battery can supply and burn out. A series resistor sets the current.
In a series circuit the supply voltage is shared. Each LED takes its forward voltage , and the resistor takes the rest:
The resistor and the LEDs carry the same current, so Ohm’s law, , gives the resistance that allows exactly current :
Resistors come in standard values, so the calculator rounds up to the next E12 value. A slightly larger resistor gives slightly less current, which is the safe direction.
Worked example
A red LED ( V) at 15 mA from a 5 V supply:
The next standard value is 220 Ω, which gives mA. The resistor dissipates W, well within a common ¼ W resistor.
Watch out for
- Forward voltage varies. It depends on color and on the specific part, from about 1.8 V (red) to 3.3 V (blue, white). Check the datasheet.
- Don’t share one resistor between parallel LEDs. Small differences in let one LED hog the current. Give each parallel branch its own resistor.
- Power rating. Pick a resistor rated at about twice the calculated power.
Sources
- IEC 60063, Preferred number series for resistors and capacitors (E series)
Last checked