Calculators
LED resistor calculator
By Bulan Sarkar
Enter the supply, the LED and the current you want. You get the exact resistor, the next standard value up, the current that value really gives, and the wattage the resistor needs. Strings of LEDs in series work too.
Typical figure. The datasheet's value at your current is better.
- Resistor (E12, next value up)
- 220 Ω
- exact value 200 Ω
- Current you get
- 13.6 mA
- 13.2 mA to 14.1 mA if each LED's forward voltage is 0.1 V off
- Resistor power
- 40.9 mW
- use a ⅛ W part or bigger
- Power in each LED
- 27.3 mW
- Total from the supply
- 68.2 mW
- Reaches the LEDs
- 40 %
- the rest warms the resistor
The formula
R = (Vsupply − n × Vf) / I
An LED holds its forward voltage, Vf, fairly steady over a wide range of current, and it has almost no resistance of its own above that. Connect one straight across a supply above Vf and the current climbs until something burns. The series resistor takes whatever voltage is left over, and Ohm's law turns that leftover voltage into a current. With n LEDs in the string, each one takes its own Vf out of the supply first.
The calculator rounds up to the next standard value, never down, so the real current lands at or a little below the one you asked for. It then works out the power in the resistor, I²R, and suggests a rating at least twice that. A resistor run at its full rating is hot enough to hurt and drifts; half its rating is the usual rule.
The forward voltages in the list are typical figures for ordinary 3 mm and 5 mm LEDs: about 2.0 V for red, about 3.1 V for white and blue. Real parts vary by a tenth of a volt or more between samples, and the current range under the result shows what that does. The LED lesson explains why colour sets the voltage, and LED circuits covers strings, parallel LEDs and PWM dimming.
Worked examples
A red LED on a 5 V pin
A red LED at about 2.0 V, driven at 10 mA from 5 V. The resistor sees 5 − 2.0 = 3.0 V, and 3.0 V / 10 mA = 300 Ω. That is not in E12, so take the next value up, 330 Ω.
With 330 Ω the current is 3.0 V / 330 Ω = 9.09 mA, a little under the target. You will not see the difference in brightness. The resistor dissipates 27.3 mW, so an ⅛ W part is plenty, and the LED itself takes 18.2 mW.
Three white LEDs in series on 12 V
Three white LEDs at about 3.1 V each need 3 × 3.1 = 9.3 V between them. At 20 mA from 12 V, the resistor gets the other 2.7 V: 2.7 V / 20 mA = 135 Ω. The next E12 value up is 150 Ω, which gives 18 mA and dissipates 48.6 mW; an ⅛ W resistor covers it.
77.5 % of the power reaches the LEDs, much better than three separate LEDs each with its own resistor on 12 V. The catch is the small headroom. If each LED lands 0.1 V away from 3.1 V, the current runs from 16 mA to 20 mA. A fourth LED would need 12.4 V, more than the supply, and the calculator refuses it.
Several LEDs in parallel
Give each LED, or each series string, its own resistor. Two LEDs sharing one resistor do not share the current evenly: the one with the slightly lower forward voltage takes more, runs hotter, drops lower still and takes more again. The current limiting lesson covers why a resistor is the simplest limit, and resistor power rating covers what the wattage figure means for a part on a real board.