Skip to content

LED Resistor Calculator

Series resistor for one or several LEDs: exact value, nearest E12/E24 resistor, real current and the wattage to buy.

Your details

V

Sets a typical forward voltage; use your datasheet value with “Custom” when you have it.

20 mA is the classic rating of 3 mm and 5 mm LEDs; 5–10 mA is often bright enough for indicators.

mA
Resistor series

Results update as you type

Resistor to use

360 Ω

Exact calculated value
333.33 Ω
Actual LED current
13.89 mA
Power in the resistor
69.4 mW
Recommended resistor rating (×2 margin)
0.25 W
Power per LED
27.8 mW
Share of power reaching the LEDs
44.4%

Step-by-step solution
  1. R = (Vs − n × Vf) / I = (9 − 2 × 2) / 0.015 A = 333.33 Ω
  2. E24 → 360 Ω ; I = 5 / 360 = 13.89 mA
  3. P = I² × R = (0.01389 A)² × 360 Ω = 69.4 mW

An LED is not a lamp you can connect straight to a battery. Once the voltage across it passes its forward voltage VfV_f, the current rises almost vertically, and a few extra tenths of a volt are enough to burn it out. The simplest and most common way to set a safe current is a series resistor that takes up the voltage the LEDs do not use.

This LED resistor calculator works out that resistor for a single LED or a string of LEDs in series. Enter the supply voltage, choose a colour (which sets a typical forward voltage) or type the value from your datasheet, set the number of LEDs and the current you want. You get the exact resistance, the next standard value up in the E12 or E24 series (rounding up keeps the current at or below your target), the real current with that resistor, the power the resistor turns into heat and a wattage rating with a twofold safety margin.

If the supply is not higher than the sum of the forward voltages, no resistor can work and the calculator tells you so. To read the colour bands of the resistor you pick, use the resistor colour code calculator; to combine two resistors into an odd value, see the parallel resistor calculator.

How to use this calculator

  1. Enter the supply voltage (battery, USB 5 V, 12 V adapter…).
  2. Choose the LED colour, or “Custom” to type the forward voltage from the datasheet.
  3. Enter the number of LEDs in series in one string and the current you want (often 10–20 mA).
  4. Pick the E12 or E24 series, depending on the resistors you have.
  5. Read the resistor to use, the actual current, the power in the resistor and the recommended wattage.

The formula

The supply voltage VsV_s is shared between the LEDs and the resistor. With nn identical LEDs in series, each dropping VfV_f, Ohm’s law gives:

R=Vs−n VfIR = \frac{V_s - n \, V_f}{I}

The chosen standard resistor Rstd≥RR_\text{std} \ge R sets the real current, and the resistor dissipates:

Ireal=Vs−n VfRstdPR=Ireal2 RstdI_\text{real} = \frac{V_s - n \, V_f}{R_\text{std}} \qquad P_R = I_\text{real}^2 \, R_\text{std}

A resistor rated at least 2PR2 P_R runs cool and lasts. The share of the input power that reaches the LEDs is nVf/Vsn V_f / V_s.

Worked example

Two red LEDs on a 9 V battery at 15 mA. The LEDs take 2×2.0=42 \times 2.0 = 4 V, so the resistor sees 5 V:

R=9−2×2.00.015=333.3 ΩR = \frac{9 - 2 \times 2.0}{0.015} = 333.3\ \Omega

The next E24 value is 360 Ω (390 Ω in E12). With 360 Ω the current is 13.9 mA and the resistor dissipates 69.4 mW, so a 0.25 W resistor is fine.

Three white LEDs on 12 V at 20 mA. 12−3×3.2=2.412 - 3 \times 3.2 = 2.4 V, R=2.4/0.02R = 2.4 / 0.02 = 120 Ω exactly, dissipating 48 mW: a 0.125 W part has the twofold margin.

Typical forward voltages

Forward voltage depends on the semiconductor, and therefore on the colour. The presets are typical values at about 20 mA; a real part can differ by a few tenths of a volt, so the datasheet always wins.

Colour Material Typical VfV_f
Infrared GaAs 1.2 V
Red, orange AlGaAs, AlInGaP 1.8 – 2.2 V
Yellow, yellow-green AlInGaP, GaP 2.0 – 2.4 V
True green, blue, white InGaN 2.8 – 3.6 V
Ultraviolet InGaN 3.2 – 3.8 V

Several LEDs: series strings, not shared resistors

Putting LEDs in series with one resistor is efficient, because the same current flows through all of them. Putting LEDs in parallel on a single resistor is a classic mistake: small differences in forward voltage make one LED hog the current and fail first. Give every parallel string its own resistor. When the voltage left for the resistor is very small, or the resistor would dissipate watts, a constant-current driver is the better choice.

Frequently asked questions

What resistor do I need for an LED on 5 V?

For a red LED at 20 mA: (5 − 2.0) / 0.02 = 150 Ω. For a white or blue LED at 20 mA: (5 − 3.2) / 0.02 = 90 Ω, so use 91 Ω (E24) or 100 Ω (E12).

What resistor do I need for a 12 V LED?

One red LED at 20 mA needs (12 − 2.0) / 0.02 = 500 Ω, so 510 Ω in E24, dissipating about 0.2 W: choose a 0.5 W resistor. Three white LEDs in series need only 120 Ω and waste far less power.

Why round the resistor up rather than to the nearest value?

A larger resistor gives slightly less current than your target, which is always safe. Rounding down could push the LED above its rating. The loss of brightness from a few percent less current is not visible.

Can I run an LED without a resistor?

Only from a constant-current driver or a source whose internal resistance limits the current, such as some coin cells. From a voltage source, the current is set only by the steep LED curve and can rise far above the rating.

How many LEDs can I put in series?

As many as keep the total forward voltage below the supply with some headroom, ideally leaving at least 10–20 % of the voltage for the resistor so the current stays stable when the LEDs warm up.

Sources

Last updated:

More Physics calculators

People also use