LED resistor calculator
Get the current-limiting resistor for one LED or a series string: the standard value to buy and the wattage it needs.
The formula
R = (Vsupply − Vforward × number of LEDs) ÷ current. With a 5 V supply, a 2 V red LED and 20 mA: (5 − 2) ÷ 0.020 = 150 Ω. The calculator rounds up to the next standard value so the LED gets slightly less current than the maximum, never more.
Common questions
Why does an LED need a resistor?
An LED has almost no resistance once it turns on, so without something limiting the current it will draw far too much and burn out. The resistor sets the current.
What forward voltage should I use?
Check the datasheet. Typical values: red 1.8–2.2 V, yellow/orange 2.0–2.2 V, green 2.0–3.2 V depending on type, blue and white 2.8–3.4 V.
How much current should an LED get?
Standard 5 mm indicator LEDs are rated around 20 mA, but 5–10 mA is usually plenty bright and extends their life. High-power LEDs need a constant-current driver instead of a resistor.
Can I wire several LEDs to one resistor?
In series, yes: the forward voltages add up and they share one resistor. In parallel, give each LED its own resistor, since slight differences make one LED hog the current.