LED Resistor Calculator

LED Resistor Calculator

Find the series resistor for one LED, a string, LEDs in parallel or an array, rounded up to a standard E series value, with the real current, resistor power and efficiency.

Every figuretap a card to copy its value

LED current against resistor value

Nearby standard values

Resistor = (supply voltage − LED voltages) ÷ current, rounded up to the next value in the chosen E series. Resistor power = voltage across it × current, and the minimum rating is twice that. The LED voltage is a typical figure, and the datasheet of your part governs. The CSV, image and printed report contain only the values you entered.

How to use this tool

Choose one LED, LEDs in series, LEDs in parallel, an array of rows, or the tables. Enter the supply voltage, pick an LED color to fill in a typical forward voltage (or type your own) and set the current in milliamps. You get the exact resistor, the next standard value at or above it, the real current, the resistor power and minimum wattage, and the share of supply power that reaches the LED.

The input most often wrong is the forward voltage. Red sits near 2 V and blue and white near 3.3 V, but several tenths of a volt of spread is normal, so type the datasheet value at your test current when you have it. The tool wants at least 1 V across the resistor and says plainly when a supply cannot drive the string.

What the calculation is doing

The resistor takes whatever the LEDs do not: R = (V − N × Vf) ÷ I, with V the supply, N the LEDs in series and I the current. For 5 V, a red LED at 2 V and 20 mA, that is (5 − 2) ÷ 0.020 = 150 Ω. The tool picks the smallest value in your E series at or above R, so the real current never exceeds the target, and the resistor dissipates P = (V − N × Vf)² ÷ R, here 3² ÷ 150 = 60 mW.

The minimum rating is the smallest standard size, 1/16 W to 10 W, at least twice P, so the resistor runs at 50% or less. NASA's EEE parts derating guide uses 0.6 for film resistors at 70 °C and a NAVSEA guide 55 to 70%, so 50% is the cautious end. Efficiency is N × Vf ÷ V, 40% for the default; the rest is heat.

With a resistor for each parallel LED, every branch is the single LED case. With one shared resistor the tool sizes it for the total current, then solves the circuit: the LEDs share one voltage and each takes I × e^((voltage − its Vf) ÷ (n × Vt)), the Shockley diode equation. The tool uses n × Vt = 51.4 mV, an assumption (ideality factor 2 at 25 °C); Wikipedia gives 1 to 2 for silicon diodes and LED datasheets do not print it.

Three circuits on a 5 volt supply with red LEDs at 2.0 volts and a 20 milliamp target. Two LEDs in series share one 51 ohm resistor and carry 19.6 milliamps. Two LEDs in parallel with a 150 ohm resistor each carry 20.7 and 19.3 milliamps when their forward voltages are 0.2 volts apart. Two LEDs sharing one 75 ohm resistor carry 40 and 0.82 milliamps, a split of 49 to 1. Below, the arithmetic for 150 ohms and 60 milliwatts and a bar chart of the four currents against the 20 milliamp target.
Each resistor in the recommended layout drops about 3 V, so a 0.2 V difference in forward voltage moves its current by only 3.3%. Share one resistor and the same difference hands 98% of the current to a single LED.

Why an LED needs a resistor at all

An LED is not a resistor. Below its forward voltage it stays dark, and above it the current climbs exponentially, so a small change in voltage gives a large change in current. A fixed supply cannot set that current. In the model here, another 0.1 V across the LED multiplies its current by e^(0.1 ÷ 0.0514), about 7.

A series resistor turns the cliff into a slope. With 3 V across 150 Ω, a 0.1 V change in LED voltage moves the current by 0.1 ÷ 150 = 0.67 mA, or 3.3% of 20 mA. The more you leave across the resistor, the better it regulates. On 3.3 V a red LED leaves 1.3 V and the same 0.1 V is 7.7% of the current, while 12 V leaves 10 V and it is 1%.

Why the forward voltage varies

Forward voltage follows the semiconductor, so it follows color: infrared near 1.2 V, red and orange near 2 V, InGaN blue, green and white near 3.3 V. Wikipedia's color table gives red as 1.63 to 2.03 V and blue as 2.48 to 3.7 V, so the spread inside one color is wide. The table compares the tool's value with the datasheets read for this page.

Color and typeTool valueTypicalMaximumDatasheets read
Infrared, 940 nm1.2 V1.2 V1.6 VKingbright WP7113F3C
Red2 V1.9 to 2 V3 VKingbright WP7113ID, Vishay TLHR540x
Orange2 V2 V2.5 VKingbright WP7113SEC
Yellow2.1 V1.95 to 2.4 V3 VKingbright WP7113YD, Vishay TLHY540x
Green, standard2.2 V2.2 to 2.4 V3 VKingbright WP7113SGC, Vishay TLHG540x
Green, InGaN3.3 V3.3 V4.1 VKingbright WP7113ZGC
Blue3.3 V3.3 to 3.9 V4.5 VKingbright WP7113QBC/D, Vishay TLHB5400
White3.3 V3.3 V4 VKingbright WP7113QWC/D

Three more things move it. Current: Vf is quoted at a test current, 10 mA for the Kingbright red and 20 mA for the Vishay red, and rises with current. Temperature: the Kingbright red gives −1.9 mV/°C, so 30 °C hotter needs about 57 mV less. Spread: that datasheet adds ±0.1 V, and two blue parts in the table differ by 0.6 V typical. Treat the fill in value as typical, because the datasheet of your part governs. The plus or minus 0.2 V line shows the effect: 21.3 mA or 18.7 mA for the default.

Rounding up and resistor wattage

The exact resistor is rarely a standard value, and the gap to the next one can be 25% in E12, 15.4% in E24 and 3.0% in E96. For 9 V, a 1.8 V LED and 15 mA the exact value is 480 Ω, and E24 rounds up to 510 Ω and 14.1 mA, 5.9% under target, while 470 Ω would give 15.3 mA, 2.1% over. Some tutorials round down: Wikipedia takes 2,040 Ω to 2 kΩ and accepts 5.1 mA on 5 mA. That suits a target with margin, which the tool cannot know, so it never rounds down.

Wattage is where higher supplies bite. At 5 V the default resistor dissipates 60 mW and 1/8 W is plenty. On 12 V the same LED needs 510 Ω with 10 V across it: 196 mW, which is 78% of a 1/4 W part, so the tool asks for 1/2 W. Ratings are quoted at 70 °C ambient, which a closed box does not give you.

Parallel LEDs and the shared resistor

Suppose two red LEDs share one resistor from 5 V. Sized for the total, (5 − 2) ÷ 0.040 = 75 Ω, and it works while the LEDs match. Let their forward voltages differ by 0.2 V, 1.9 V and 2.1 V, inside the datasheet spread. In the model the lower voltage LED takes 40 mA and the other 0.82 mA, a split of 49 to 1. With 150 Ω each, the currents are 20.7 mA and 19.3 mA.

The cause is the exponential. The LEDs share one voltage, so a 0.2 V difference multiplies one current over the other by e^(0.2 ÷ 0.0514) = 49. All About Circuits shows it with an LED that turns on at 1.3 V instead of 1.6 V: it holds the shared node at 1.3 V and starves its neighbors. With an ideality factor of 1 the 49 would be about 2,400, so the conclusion holds either way.

Heat feeds it. At about 1.9 mV per °C for the Kingbright red, 10 °C more is worth 19 mV, or 1.45 times the current at the same voltage, which heats the LED further. Give each LED its own resistor.

Series strings, arrays, and when a resistor is the wrong answer

In a series string one current flows through every LED, so one resistor serves the string and the forward voltages add. Wikipedia says the source must be at least the sum of the LED voltages, typically with the LEDs taking about two thirds of the supply. The tool adds a rule of its own: 1 V across the resistor. Two red LEDs on 5 V leave exactly 1 V (51 Ω), and three would need 7 V.

Every row of an array needs its own resistor. Four rows of three red LEDs on 12 V take 80 mA through four 300 Ω resistors, and each row keeps its current whatever its neighbor does. One resistor for several rows brings back the shared resistor problem.

For high power LEDs a resistor is the wrong tool. Wikipedia notes that an active constant current source is commonly used: the forward voltage moves with temperature, and the resistor turns the gap between supply and LED into heat, 60% of the power in the default and 83% on 12 V. The tool accepts up to 1,000 mA but points to a driver above a few hundred.

Resistors for common supplies and colors

The E24 resistor in ohms for each supply and color at 10, 15 and 20 mA. Too low means less than 1 V would remain across the resistor. A 5 V supply with a red LED at 20 mA needs 150 Ω, and with a blue LED 91 Ω. A 3.3 V supply cannot drive a blue or white LED.

Supply, VmAInfraredRedOrangeYellowGreenBlueWhite
3.310220130130120110too lowtoo low
510390300300300300180180
910820750750750680620620
12101,1001,0001,0001,0001,000910910
24102,4002,2002,2002,2002,2002,2002,200
3.31515091918275too lowtoo low
515270200200200200120120
915560470470470470390390
1215750680680680680620620
24151,6001,5001,5001,5001,5001,5001,500
3.32011068686256too lowtoo low
5202001501501501509191
920390360360360360300300
1220560510510510510470470
24201,2001,1001,1001,1001,1001,1001,100

A worked example you can check on paper

The default view is 5 V, a red LED at 2 V, 20 mA and E24. Across the resistor: 5 − 2 = 3 V. Exact resistor: 3 ÷ 0.020 = 150 Ω, an E24 value, so the current is 3 ÷ 150 = 20 mA. The value below, 130 Ω, would give 23.1 mA, 15.4% over. Resistor power: 3 × 0.020 = 60 mW, twice that is 120 mW, so 1/8 W will do. LED power: 2 × 0.020 = 40 mW of the 100 mW supply power, an efficiency of 40%.

Two red LEDs in series on 5 V: (5 − 2 × 2) ÷ 0.020 = 50 Ω, so 51 Ω gives 1 ÷ 51 = 19.6 mA. Three white LEDs on 12 V at 20 mA: 12 − 3 × 3.3 = 2.1 V, 2.1 ÷ 0.020 = 105 Ω, so 110 Ω gives 19.1 mA and 2.1² ÷ 110 = 40.1 mW.

Mistakes that catch people out

Trusting one typical voltage. Two red datasheets in the table print 1.9 V at 10 mA and 2.0 V at 20 mA. Type your own value and read the plus or minus 0.2 V line.

Rounding down to the resistor in the drawer. 470 Ω instead of 480 Ω is 2.1% over, and 130 Ω instead of 150 Ω is 15.4% over. Round up.

Forgetting the wattage. A 1/4 W resistor is fine on 5 V and marginal on 12 V.

Sharing one resistor between parallel LEDs. It works with matched parts and fails with another batch or a warm day.

Running out of headroom. A string with 0.3 V left for the resistor has almost no regulation. Keep 1 V across it.

Popular calculations

Each one opens the calculator with those figures filled in.

3.3 V supply

5 V supply

9, 12 and 24 V supplies

LEDs in series

LEDs in parallel, shared or separate

Arrays of rows

Tables

How this was checked

The formula and examples were compared with published ones: SparkFun's resistor tutorial (720 Ω), the Electronics Tutorials LED page (480 Ω, 320 Ω, 50 Ω), a Carnegie Mellon exercise (170 Ω), Evil Mad Scientist Laboratories (48 Ω, then 51 Ω) and Wikipedia (2,040 Ω), and the tool returns each. The E12, E24 and E96 lists equal the IEC 60063 lists on Wikipedia and Vishay document 28372, and E96 equals an EIA 96 table. Voltages come from eight Kingbright WP7113 datasheets and four Vishay ones.

The chosen value equals an exact integer search on 18,198 combinations of supply (1.5 to 48 V), Vf (1.2 to 4.2 V) and current (1 to 350 mA), and 19,378 random cases matched a float search. The shared resistor solution matched a separately coded Newton solver on 4,000 random cases. The n × Vt value is an assumption, so 49 to 1 is a model result, not a measurement.

Common questions

How do you calculate the resistor for an LED?

Subtract the LED forward voltage from the supply and divide by the current in amps: (5 − 2) ÷ 0.020 = 150 Ω for a red LED on 5 V at 20 mA. Then use the next standard value at or above it.

Which forward voltage should I use?

The datasheet value at your test current. Without one, use about 1.2 V for infrared, 2 V for red and orange, 2.1 V for yellow, 2.2 V for standard green and 3.3 V for InGaN green, blue and white.

Should I round the LED resistor up or down?

Up. A larger resistor gives slightly less current and light and cannot exceed the target. For 9 V, 1.8 V and 15 mA, 510 Ω gives 14.1 mA where 470 Ω would give 15.3 mA.

What wattage resistor do I need for an LED?

Take the voltage across the resistor squared, divided by its resistance, and choose a rating of at least twice that. The default 150 Ω dissipates 60 mW, so 1/8 W will do. On 12 V the same LED needs 510 Ω at 196 mW, so 1/2 W.

Can I run LEDs in parallel from one resistor?

You can, but the current will not divide evenly, because LED current rises exponentially with voltage. Two red LEDs 0.2 V apart on a shared 75 Ω resistor take 40 mA and 0.82 mA in the model. With a resistor each, both stay within 3.3% of the target.

How many LEDs fit in series?

The supply must cover their forward voltages plus at least 1 V across the resistor. A 5 V supply drives two red LEDs, and a 12 V supply drives five red ones or three white ones.

Related Calculators and Reference