An LED is not a light bulb: once the voltage across it reaches its forward voltage, its current rises steeply, so it needs a resistor (or a constant-current driver) to set the current. This calculator finds that resistor for one LED or a series string, rounds it up to a standard value you can buy, and tells you the current you will actually get, the power in the resistor and the wattage rating to choose.
How to use the LED resistor calculator
- Enter the supply voltage — for example 5 V from USB, 9 V from a battery or 12 V from an adapter.
- Pick the LED type. Each color has a typical forward voltage; choose Custom to type the value from your LED’s datasheet.
- Enter the LED current in milliamps. Most 5 mm indicator LEDs are rated for 20 mA, and many are bright enough at 5–10 mA.
- Enter how many LEDs are in series in the string.
- Choose the standard resistor series your parts come from. E12 is typical of hobby kits; E24 offers finer steps.
LED resistor formula
Here Vs is the supply voltage, n the number of LEDs in series, Vf the forward voltage of each LED and I the current in amps. The resistor’s power is P = I2R.
| LED color | Typical forward voltage |
|---|---|
| Infrared (940 nm) | 1.2–1.5 V |
| Red | 1.8–2.2 V |
| Orange, amber, yellow | 2.0–2.2 V |
| Classic yellow-green | 2.0–2.4 V |
| True green, blue, white | 2.8–3.4 V |
| UV (395–405 nm) | 3.2–3.6 V |
Colors with higher photon energy need more voltage, which is why blue and white LEDs sit near 3 V while red LEDs are near 2 V.
Worked examples
One white LED on a 9 V battery at 20 mA (the default)
R = (9 − 3.2) ÷ 0.020 = 290 Ω. The next E12 value up is 330 Ω.
Actual current: 5.8 V ÷ 330 Ω = 17.58 mA. The resistor dissipates (0.01758)² × 330 = 101.9 mW, so a 1/4 W part is the right size.
Three white LEDs in series on 12 V. The string needs 3 × 3.2 = 9.6 V, leaving 2.4 V for the resistor: 2.4 ÷ 0.020 = 120 Ω, a standard value, dissipating only 48 mW. Eighty percent of the power now goes into light-producing LEDs instead of heat. The trade-off is less headroom: if the supply sags to 11 V, the current falls to about 11.7 mA, so very long strings are better driven by a constant-current regulator.
A red LED on 5 V. (5 − 2.0) ÷ 0.020 = 150 Ω, already an E12 value, at 60 mW.
Getting reliable results
- Use datasheet values. Forward voltage varies between manufacturers and even within one batch, and it falls slightly as the LED warms up. Measure one if you are unsure.
- Leave headroom. If the resistor gets less than about 15% of the supply, small changes in supply or LED voltage swing the current a lot. The calculator warns you when this happens.
- Respect the maximum current. Indicator LEDs are commonly rated around 20–30 mA continuous; high-power LEDs (350 mA and up) need heat sinking and a dedicated driver rather than a resistor.
- Check polarity. The longer lead is the anode (+). Reversed LEDs simply stay dark, but most only tolerate about 5 V in reverse.
If you are reading the resistor you already have, the resistor color code calculator decodes its bands. The Ohm’s law calculator covers the general case, and the battery life calculator estimates how long a battery will run your LEDs.
For low-voltage DC circuits. LED fixtures connected to household wiring must use listed drivers and be installed according to your local electrical code, by a licensed electrician where required.
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 you want: R = (Vs − Vf) ÷ I. A white LED (about 3.2 V) on 9 V at 20 mA needs (9 − 3.2) ÷ 0.02 = 290 Ω. Round up to the next standard value, such as 330 Ω.
Should I round the resistor up or down?
Round up. A larger resistor lowers the current slightly, which is safe; a smaller one pushes the LED past the current you designed for. With 330 Ω instead of 290 Ω, the white LED example runs at 17.6 mA instead of 20 mA and looks almost identical.
Can several LEDs share one resistor?
LEDs in series can share one resistor, as long as their total forward voltage leaves headroom below the supply. LEDs in parallel should each have their own resistor, because small differences in forward voltage make one LED hog the current.
What happens if I connect an LED without a resistor?
An LED's current rises steeply once the voltage passes its forward voltage, so without something to limit it, the current is set only by the supply and wiring. The LED usually overheats and fails within seconds, sometimes instantly.
What wattage resistor do I need for an LED?
Multiply the resistor's voltage by the current: 5.8 V × 17.6 mA ≈ 0.10 W in the 9 V example. Choose a rating at least twice that, so a 1/4 W resistor is fine. Higher supply voltages or several parallel strings can call for 1/2 W or more.