Circuit 3D

LED resistor calculator

An LED needs a resistor in series to set its current: subtract the LED’s forward voltage from the supply and divide what is left by the current you want. So a red LED on 5 V at 20 mA needs (5 V − 2 V) ÷ 0.02 A = 150 Ω.

R = (Vsupply − VF) ÷ I

where VF is about 2 V for a red LED and 3 V for blue or white, and I is usually 20 mA, so a red LED on 5 V needs (5 V − 2 V) ÷ 20 mA = 150 Ω.

Round up to the next standard size, so the current comes out a little lower, never higher. For LEDs in series, subtract each one’s forward voltage.

How do you calculate an LED resistor?

To calculate an LED resistor, subtract its forward voltage from the supply, divide by the current you want and round up to a standard size: (5 − 2) ÷ 0.02 = 150 Ω.

Enter your supply, the LED’s forward voltage, its current and how many are in series. The calculator gives the exact value, the standard size to buy, the current it lets through and the power rating it needs.

LED resistor calculator

R = (5 V − 2 V) ÷ 20 mA = 3 V ÷ 20 mA ≈ 150 Ω, a standard size, giving 20 mA. It turns 60 mW into heat, so a ⅛ W resistor is plenty.

Figure 1. Red LEDs drop about 2 V, green 2 to 3 V, blue and white about 3 V. The 3D shows the lab’s resistor at the standard size and its red LED, glowing with the current that size lets through.

Why does an LED need a resistor?

An LED needs a resistor because its current climbs steeply once its forward voltage is passed, so even a little extra voltage drives far too much current; a series resistor sets the current instead.

The resistor takes whatever voltage the LED doesn’t, and by Ohm’s law that fixes the current. Figure 2 tries different resistors on a red LED from 5 V.

20 mA 30 mA 150 Ω from 5 V

150 Ω: about 20 mA, a safe, bright glow.

Figure 2. A red LED on 5 V through different resistors, worked out from the LED’s curve rather than a fixed 2 V, so the current is what it would really be.

What forward voltage does an LED have?

An LED’s forward voltage is about 2 V for red, orange and yellow, about 2 to 3 V for green, and about 3 V for blue and white; the datasheet gives the exact figure.

The forward voltage rises a little with current. If you don’t know it, a red 2 V or a blue 3 V guess still gives a safe resistor, as how an LED works explains.

Which standard resistor should you use?

Use the next standard resistor size above the exact value, so the current lands just under your target rather than over it.

Resistors are made in standard sizes such as the E12 series: 100, 120, 150, 180, 220, 270, 330, 390, 470, 560, 680 and 820, in every decade. Read a resistor’s value from its color bands.

How do you wire several LEDs?

To wire several LEDs in series, use one resistor for one current through every LED, as long as the supply exceeds their forward voltages together; in parallel, give each LED its own resistor.

LEDs in parallel on a shared resistor don’t share the current evenly, because no two have exactly the same forward voltage, which is why a seven-segment display gives each segment its own. Figure 3 strings red LEDs in series on 12 V.

LEDs 6 V resistor 6 V 12 V shared along the string

3 LEDs: R = (12 V − 3 × 2 V) ÷ 20 mA = 300 Ω, every LED sharing the same 20 mA; the resistor wastes 120 mW.

Figure 3. Red LEDs of about 2 V in series on 12 V, run at 20 mA. More LEDs leave less for the resistor, and waste less in it.

How do you choose an LED resistor and its rating?

To choose an LED resistor and its rating, work out the resistance from the voltage left over, then its heat, P = V × I, and buy at least twice that rating: 3 V at 20 mA is 60 mW.

Example 1: a resistor by color

A blue LED should run at 20 mA from 9 V. What resistor does it need?

Given
a 9 V supply and a blue LED of about 3 V, run at 20 mA
Find
the resistor, R
Solution
The resistor takes the rest: 9 V − 3 V = 6 VR = 6 V ÷ 20 mA = 300 Ω; the next standard size up, 330 Ω, gives 18.2 mA
Answer
R = 330 Ω

Example 2: the resistor’s power rating

A red LED runs at 20 mA from 12 V. How much power does its resistor take, and what rating should you use?

Given
a red LED of about 2 V at 20 mA from 12 V
Find
the power in its resistor, and the rating to buy
Solution
P = V × I = (12 V − 2 V) × 20 mA = 200 mWAllow twice that: a ½ W resistor or bigger
Answer
200 mW; use ½ W

Summary

Key equations

  • R = (V − VF) ÷ I one LED
  • R = (V − n × VF) ÷ I n LEDs in series
  • P = (V − VF) × I the resistor’s heat

Key terms

Forward voltage
The voltage an LED drops while lit.
Standard size
A value resistors are made in, such as 150 Ω.
Power rating
The most heat a resistor is made for.
E12
The twelve standard steps in each decade.

Practice problems

  1. What resistor runs a red LED (2 V) at 20 mA from 5 V?

  2. The exact value comes to 350 Ω. Which standard size do you use?

  3. Three red LEDs of 2 V go in series on 12 V at 20 mA. What resistor?

  4. What happens if you connect an LED to 5 V with no resistor?

  5. How much power does a red LED’s resistor take at 20 mA from 12 V?

FAQ

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

About 150 Ω for a red LED at 20 mA, and 100 Ω for a blue or white one: (5 V − V_F) ÷ 0.02 A.

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

500 Ω, so 560 Ω, for a red LED at 20 mA, and 470 Ω for blue or white; the resistor takes about 0.2 W, so use ½ W.

Can I use a bigger resistor than calculated?

Yes. A larger resistor only lowers the current, so the LED is dimmer but safe; a smaller one can overload it.

Does it matter which side of the LED the resistor goes?

No. In series the same current flows through both, so the resistor can sit before or after the LED.

Do LEDs need a resistor on 3.3 V?

Yes for red, with about 65 Ω, so 68 Ω, at 20 mA. A blue or white LED of about 3 V leaves so little that its brightness depends on its exact forward voltage.

Can several LEDs share one resistor?

In series, yes. In parallel, no: their forward voltages differ slightly, so one takes most of the current. Give each its own resistor.

What current should I run an LED at?

About 20 mA for a standard 5 mm LED, and as little as 2 to 5 mA for an indicator, which is often bright enough.