Questions about a circuit? Ask in the Wirecora Discord →Questions? Ask in the Wirecora Discord →

LED resistor calculator

Pick your supply, the LED colour and the current. You get the resistor to buy, its colour bands and the power it needs.

Resistor to use150 Ω

The formula gives 150 Ω; the next standard value up is safer. 3 V is left for the resistor.

Quick picks
LED colour

150 Ω colour bands

E12: in every starter kit

150 Ω

  • Brown
  • Green
  • Brown
  • Gold

Current: 20 mA

Heat in the resistor: 60 mW, so use a ¼ W resistor or bigger.

E24: closer, a bit less common

150 Ω

  • Brown
  • Green
  • Brown
  • Gold

Current: 20 mA

Heat in the resistor: 60 mW, so use a ¼ W resistor or bigger.

Exact value from the formula
150 Ω
Power in each LED
40 mW
How the LED resistor is worked out

How do I work out an LED resistor?

R = (supply voltage − LED voltage) ÷ current

The LED keeps its forward voltage; the resistor takes the rest. Ohm's law then gives the resistance for the current you want. With LEDs in series, add up their voltages first.

  1. Take the LED voltage away from the supply. 5 V − 2 V for a red LED leaves 3 V for the resistor.
  2. Divide by the current in amps. 20 mA is 0.02 A, so 3 ÷ 0.02 = 150 Ω.
  3. Pick the next standard value up. If the answer is not a value you can buy, the next one up is the safe choice.
  4. Check the power. 3 V × 0.02 A = 0.06 W of heat, well inside a ¼ W resistor.
LED forward voltage by colour

What voltage does each LED colour need?

Typical figures for standard 3 mm and 5 mm LEDs at about 20 mA. Your LED's datasheet has the exact one.

Typical LED forward voltage by colour
LED colourTypical forward voltageUsual range
Red2.0 V1.8 to 2.2 V
Orange2.0 V1.9 to 2.2 V
Yellow2.1 V1.9 to 2.2 V
Yellow-green2.1 V1.9 to 2.4 V
Bright green3.0 V2.8 to 3.3 V
Blue3.0 V2.8 to 3.3 V
White3.0 V2.8 to 3.3 V
LED resistor values at 20 mA

What resistor for a common supply?

One LED at 20 mA, with the next E12 value up (the values in every starter kit) and its colour bands.

LED series resistor for common supply voltages at 20 mA
SupplyLEDExactResistor (E12)Colour bandsHeat
3.3 VRed (2.0 V)65 Ω68 ΩBlueGrayBlackGold25 mW
3.3 VBlue or white (3.0 V)15 Ω15 ΩBrownGreenBlackGold6 mW
5 VRed (2.0 V)150 Ω150 ΩBrownGreenBrownGold60 mW
5 VBlue or white (3.0 V)100 Ω100 ΩBrownBlackBrownGold40 mW
9 VRed (2.0 V)350 Ω390 ΩOrangeWhiteBrownGold130 mW
9 VBlue or white (3.0 V)300 Ω330 ΩOrangeOrangeBrownGold110 mW
12 VRed (2.0 V)500 Ω560 ΩGreenBlueBrownGold180 mW
12 VBlue or white (3.0 V)450 Ω470 ΩYellowVioletBrownGold170 mW
Worked LED resistor examples

Can I see a few worked out?

Worked out by the same code as the calculator above.

Red LED on 5 V

150 Ω

(5 V − 1 × 2 V) ÷ 20 mA = 150 Ω. Bands: Brown, Green, Brown, Gold.

20 mA · 60 mW of heat
Blue LED on a 9 V battery

330 Ω

(9 V − 1 × 3 V) ÷ 20 mA = 300 Ω. Bands: Orange, Orange, Brown, Gold.

18.2 mA · 110 mW of heat
Red LED on a 3.3 V pin

150 Ω

(3.3 V − 1 × 2 V) ÷ 10 mA = 130 Ω. Bands: Brown, Green, Brown, Gold.

8.67 mA · 11 mW of heat
Three white LEDs on 12 V

150 Ω

(12 V − 3 × 3 V) ÷ 20 mA = 150 Ω. Bands: Brown, Green, Brown, Gold.

20 mA · 60 mW of heat
Common LED mistakes

What do people often get wrong?

No resistor at all

The LED may flash once and die. Every LED needs something to limit its current.

One resistor for LEDs in parallel

The LEDs never share evenly. Give each LED its own resistor.

LED the wrong way round

It simply stays dark. The long leg goes to plus.

Too small a resistor rating

On 12 V or more, the resistor can make enough heat to need ½ W. The calculator tells you.

LED resistor FAQ

Short answers to common questions

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

For a red LED (about 2 V) at 20 mA: (5 − 2) ÷ 0.02 = 150 Ω, a standard value. For a blue or white LED (about 3 V): (5 − 3) ÷ 0.02 = 100 Ω. A normal ¼ W resistor is enough for both.

Why does an LED need a resistor?

An LED holds a nearly fixed voltage across itself. Above that voltage its current shoots up, and only the resistor holds it down. Without one, the LED can burn out in a moment.

Why pick the next standard value up and not the nearest?

A slightly larger resistor gives slightly less current, which keeps the LED and the resistor within their limits. The light looks just as bright to the eye.

What current should I use?

A standard 5 mm LED is usually rated about 20 mA. 10 to 15 mA is still bright and lasts longer, and modern LEDs are clearly lit at 2 to 5 mA, which suits indicator lights and battery projects.

What does forward voltage mean?

It is the voltage an LED keeps across itself while it is lit. It depends mostly on the colour: about 2 V for red, orange and yellow, and about 3 V for blue, white and bright green. The datasheet gives the exact figure.

Can several LEDs share one resistor?

In series, yes: add their forward voltages and use one resistor for the string (set LEDs in series in the calculator). In parallel, no: give each LED its own resistor, or one LED takes most of the current.

What wattage should the resistor be?

At least twice the heat it makes. The calculator works out the heat (current × the voltage across the resistor) and suggests the smallest common rating with that margin. For most single LEDs on 5 V or 9 V, a ¼ W resistor is fine.

Which way round does the LED go?

The longer leg (anode) goes towards the plus side, the shorter leg next to the flat edge (cathode) towards minus. The resistor can go on either side of the LED.

More free tools

What else can I work out?