LED RESISTOR CALCULATOR

LED resistor calculator

Enter the supply and the LED, get the resistor.

V
V
mA

How do I calculate an LED resistor?

R = (supply voltage − LED forward voltage) ÷ LED current. For several LEDs in series, subtract the sum of their forward voltages (Texas Instruments).

Example

A 5 V supply, an LED with a 2.0 V forward voltage and 20 mA of current: (5 − 2.0) ÷ 0.020 = 150 Ω. The resistor dissipates 3.0 V × 0.020 A = 0.06 W.

Which standard resistor should I buy?

The next standard value up, so the current stays at or below your target. The calculator picks it from the E12 or E24 series of IEC 60063 — for example 180 Ω if the math gives 151 Ω.

Where do I find the forward voltage and current?

On the LED’s datasheet. Forward voltage depends on the LED’s color and type, and so does the current it is rated for; don’t guess.

What wattage resistor do I need?

At least the power shown — many builders choose a rating comfortably above it, such as a ¼ W resistor for a 0.06 W load.

Why do different LED colors need different resistors?

Their forward voltages differ. Texas Instruments notes that a red LED has a forward voltage close to 2 V, while green and blue LEDs are closer to 3 to 4 V. From the same supply, each color needs its own current-limiting resistor value, and an LED whose forward voltage is above the supply cannot be lit by it at all.

Is a resistor the best way to drive an LED?

It is the simplest, and TI's technical article on LED drivers calls it the least practical in a real design. A small change in the supply changes the LED current, and the heat in the resistor can feed a cycle of falling forward voltage and rising current called thermal runaway. For supplies that vary, such as a car battery, a constant-current driver is the better choice.

How the calculation works

The resistor drops whatever voltage the LEDs do not use, so its value is (supply − total forward voltage) ÷ current, and series LEDs share the same current. The power in the resistor is that same voltage drop times the current, and each LED dissipates its forward voltage times its current. Rounding up to the next standard value keeps the current at or below the target; the E12 and E24 series are the preferred values of IEC 60063. Forward voltage is quoted at one test current and shifts with temperature, so treat the result as a starting point.

Worked example

Three red LEDs in series, each 2.0 V at 20 mA, on a 12 V supply: the LEDs use 6.0 V and the resistor drops the other 6.0 V, so R = 6.0 ÷ 0.020 = 300 Ω and it dissipates 0.12 W. The next E12 value is 330 Ω, which gives 18.2 mA; the E24 series has 300 Ω itself. Supply margin matters: on 5 V with a 2.0 V LED (150 Ω), a 0.1 V shift in forward voltage moves 20 mA to 19.3 mA; on 3.3 V with a 3.0 V LED (15 Ω) the same shift cuts it to 13.3 mA.

Common mistakes

Using only one LED's forward voltage for a string is the classic slip: subtract the sum. Rounding down to the nearest standard value pushes the current above the target. Another is a supply that barely exceeds the forward voltage, so the resistor no longer controls the current. Parallel LEDs of different colors each need their own resistor. Finally, give the resistor's wattage a margin.

Sources: Texas Instruments, K. Macalanda, “Fundamentals to automotive LED driver circuits,” SLYY163, May 2019 (equations 1 and 3, typical forward voltages, linear drive and thermal runaway); Vishay, “E-Series Values,” document 28372, IEC 60063 preferred values. Check the forward voltage and test current on your LED's datasheet. Related: Ohm's law calculator, resistor color code calculator, series and parallel calculator, voltage divider calculator. How we check our calculators.