Resistor color code calculator
All tools

LED resistor for 5 V

Resistor values for LEDs on USB power, Arduino Uno/Nano pins and 5 V regulator rails. The tables use typical forward voltages and round up to the next standard value, so the LED never gets more current than the target. The calculator is preset to 5 V — change the LED or current to suit your part.

5 V LED resistor table at 20 mA

20 mA is the classic rating for 3 mm and 5 mm indicator LEDs. Formula: R = (5 − Vf) ÷ 0.020.

LED colorVfExactE12 (up)E24 (up)Actual currentPower → rating
Red / orange2 V150 Ω150 Ω150 Ω20 mA60 mW → 1/8 W
Yellow2.1 V145 Ω150 Ω150 Ω19.3 mA56 mW → 1/8 W
Green (traditional)2.2 V140 Ω150 Ω150 Ω18.7 mA52 mW → 1/8 W
True green3 V100 Ω100 Ω100 Ω20 mA40 mW → 1/8 W
Blue / white3.2 V90 Ω100 Ω91 Ω19.8 mA36 mW → 1/8 W

5 V LED resistor table at 10 mA

Modern LEDs are bright at 10 mA or less, and half the current doubles the resistor value and halves its heat.

LED colorVfExactE12 (up)E24 (up)Actual currentPower → rating
Red / orange2 V300 Ω330 Ω300 Ω10 mA30 mW → 1/8 W
Yellow2.1 V290 Ω330 Ω300 Ω9.67 mA28 mW → 1/8 W
Green (traditional)2.2 V280 Ω330 Ω300 Ω9.33 mA26 mW → 1/8 W
True green3 V200 Ω220 Ω200 Ω10 mA20 mW → 1/8 W
Blue / white3.2 V180 Ω180 Ω180 Ω10 mA18 mW → 1/8 W

LEDs in series on 5 V

The most LEDs one resistor can serve while still leaving at least 1 V across it (so the current stays predictable), with the resistor for 20 mA. Efficiency is the share of supply power that reaches the LEDs.

LED colorMax in seriesLED voltageResistor (power)Efficiency
Red / orange24 V51 Ω (20 mW)80%
Yellow12.1 V150 Ω (56 mW)42%
Green (traditional)12.2 V150 Ω (52 mW)44%
True green13 V100 Ω (40 mW)60%
Blue / white13.2 V91 Ω (36 mW)64%

When the supply is not exactly 5 V

Current with the 20 mA resistor from the table above (150 Ω for red, 91 Ω for white) at the voltages this supply really sees:

ConditionSupplyRed LEDWhite LED
USB low limit (−5%)4.75 V18.3 mA17 mA
Nominal5 V20 mA19.8 mA
USB high limit (+5%)5.25 V21.7 mA22.5 mA

Notes for 5 V circuits

5 V is the friendliest LED supply: every common color leaves at least 1.8 V across the resistor, so the current stays stable even if the forward voltage of your particular LED differs from the typical value. Two red or yellow LEDs also fit in series (4.0–4.2 V), but blue and white LEDs must be one per resistor.

On an Arduino Uno or Nano (ATmega328P), the absolute maximum is 40 mA per I/O pin and 200 mA for the whole chip; the datasheet specifies the output levels at 20 mA, which is the practical ceiling. Driving several LEDs at 20 mA each quickly adds up, so the 10 mA column is the better default for indicator LEDs on a microcontroller. USB ports allow the 5 V rail to vary by ±5%, which the supply-variation table below shows has little effect at this headroom.

Other supplies: 3.3 V · 9 V · 12 V · 24 V. The method and edge cases are explained in the LED resistor guide, and wattage in resistor power ratings.

FAQ

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

For a red LED (≈2 V) at 20 mA: (5 − 2) ÷ 0.02 = 150 Ω, so use 150 Ω. For a blue or white LED (≈3.2 V) at 20 mA: 90 Ω, so 91 Ω. At 10 mA a red LED needs 300 Ω.

What wattage resistor for an LED on 5 V?

A red LED at 20 mA puts 60 mW into a 150 Ω resistor, so use 1/8 W or larger (twice the dissipated power).

How many LEDs can I run in series on 5 V?

Leaving at least 1 V for the resistor: 2 × red / orange, 1 × yellow, 1 × green (traditional), 1 × true green, 1 × blue / white.

What resistor for an LED on an Arduino pin?

For a red LED, 150 Ω gives about 20 mA and 330 Ω about 9 mA. 220 Ω (about 14 mA) is the usual compromise. For blue or white LEDs, 100 Ω gives about 18 mA and 220 Ω about 8 mA.

← LED resistor for 3.3 V · LED resistor for 9 V →