Resistor color code calculator
All tools

LED resistor calculator

Enter the supply voltage, the LED forward voltage and the current you want. The calculator rounds up to the next standard resistor so the LED never gets more current than you asked for, and tells you the wattage to buy.

The formula

R = (Vsupply − n × Vf) ÷ I, where n is the number of LEDs in series, Vf is the forward voltage of one LED and I is the current in amps (20 mA = 0.02 A). The resistor dissipates P = I² × R.

Forward voltage depends on color and on the exact LED: red and yellow are about 1.8–2.2 V, blue, white and true green about 2.8–3.4 V. Use the datasheet value if you have it. Many modern LEDs are bright at 5–10 mA, so you can often use a larger resistor than the classic 20 mA value suggests.

Typical LED resistors

CircuitCurrentExactUsePower
Red LED on 5 V20 mA150 Ω150 Ω60 mW → 1/8 W
Red LED on 3.3 V15 mA86.7 Ω91 Ω19 mW → 1/8 W
White LED on 5 V20 mA90 Ω91 Ω36 mW → 1/8 W
Blue LED on 9 V battery20 mA290 Ω300 Ω110 mW → 1/4 W
3 white LEDs in series on 12 V20 mA120 Ω120 Ω48 mW → 1/8 W
Red LED on 12 V20 mA500 Ω510 Ω200 mW → 1/2 W

Each LED string needs its own resistor. Do not put several LEDs in parallel behind one resistor: small differences in forward voltage make one LED hog the current. Read the full LED resistor guide for worked examples.

Tables by supply voltage

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 Ω. For a lower 10 mA, use 330 Ω. For a white or blue LED (≈3.2 V) at 20 mA, use 91–100 Ω.

Should I round the LED resistor up or down?

Up. A larger resistor gives slightly less current, which is safe; a smaller one overdrives the LED.

Can I use one resistor for several LEDs?

Only for LEDs in series. LEDs in parallel each need their own resistor.