LED Resistor Calculator

Find the series resistor for an LED from supply voltage, forward voltage, and current, then pick the nearest E12 or E24 value and a safe wattage.

(5 V - 2 V) / 20 mA = 150 Ω

Supply5 V1 x LEDResistor150 Ω125 mWA+K-20 mARedGND
15x105%
Part 150 Ω
Power 125 mW
Series E24
LED
Rail

Color chips use typical Vf, not your lot. Do not share one resistor across parallel LEDs.

Zoom 100%
Utilities Studio

Want this utility on your website?

Customize colors and dark mode for WordPress, Notion or your own site.

Frequently Asked Questions

What resistor do I need for a red LED on a 5 V Arduino pin?

A typical red 5 mm LED at 2.0 V and 20 mA on 5 V needs 150 ohms and about 60 mW in the resistor. A 125 mW or 250 mW metal film part is enough. Many junk boxes use 220 ohms instead: the LED runs a little dimmer and stays safer if the forward voltage is lower than typical.

How do I calculate the resistor for an LED?

Subtract the LED forward voltage from the supply voltage, then divide by the LED current in amps. For a red LED at 2 V and 20 mA on a 5 V rail, the exact resistor is (5 - 2) / 0.02 = 150 ohms.

What forward voltage should I use?

Use the typical forward voltage from the LED datasheet at the current you want. Color chips in this tool are typical bins, not your specific LED. Starting points are about 1.3 V for infrared, 2.0 V for red, 2.2 V for yellow or green, and 3.2 V for blue or white.

Why does the tool show an E12 or E24 value instead of the exact ohms?

Through hole and chip resistors are sold in preferred number series. E12 steps are about 20 percent apart and E24 steps are about 10 percent apart. The calculator chooses the nearest preferred value and, on a tie, the higher resistance so the LED is not overdriven.

Can parallel LEDs share one resistor?

No. The LED with the lowest forward voltage takes most of the current and can burn. Put LEDs in series on one resistor, or give each parallel branch its own resistor.

When is a series resistor not enough?

Skip a single resistor for 1 W class emitters, LED strips, long automotive strings, and anything that needs a stable current as voltage sags. Those loads need a constant current driver. A resistor is a current limit for one indicator LED on a stiff rail, not a current source.

# LED series resistor calculator

A discrete LED is a current driven diode. The series resistor sets that current from Ohm's law: R = (Vs - n x Vf) / If. This calculator solves that in the browser, snaps to an E12 or E24 part, paints the color bands, and names a wattage with a factor of two of headroom.

# A red LED on an Arduino 5 V pin

The search people actually type is "what resistor for a red LED on 5 V". Typical Vf is 2.0 V at 20 mA, so (5 - 2) / 0.02 = 150 ohms and 60 mW in the resistor. Buy 150 ohms, 125 mW or 250 mW. A 220 ohm part from the drawer also works: current falls to about 14 mA and the LED is dimmer, which is often what you want on a status pin.
LED color Typical Vf Typical If Resistor on 5 V
Infrared1.3 V20 mA180 ohms
Red2.0 V20 mA150 ohms
Yellow or green2.2 V20 mA150 ohms
Blue or white3.2 V20 mA91 ohms
Ultraviolet3.4 V20 mA82 ohms

# E12 and E24 preferred values

Resistors are manufactured on the IEC preferred number series. E12 is the common 10 percent set: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 and their decades. E24 fills the 5 percent set with extra steps such as 11, 13, 16, 20, 24, 30, 36, 43, 51, 62, 75, and 91. The tool picks the nearest value and, when two values are equally close, the higher resistance so the LED runs a little dimmer rather than hotter.

# When a series resistor is not enough

A resistor is not a current source. It only sets current for a chosen supply and a chosen Vf. Do not share one resistor across parallel LEDs: the lowest Vf hogs the current. Do not use a single resistor on a 1 W emitter, an LED strip, or a long 12 V automotive string. Those need a constant current driver. Color presets are typical bins; your LED's datasheet Vf at the rated current is the number that matters.
  • Keep indicator LEDs near 10 mA to 20 mA unless the datasheet allows more.
  • Give each parallel LED its own resistor.
  • If the drop is under 1 V, a small Vf change causes a large current change.
  • On 12 V the resistor often needs 0.5 W, not a 125 mW film part.
  • Confirm anode, cathode, peak current, and wattage before you solder.
Typical Vf is not your lot
Red, blue, and white chips here are starting points for 5 mm indicators. Measure or read the manufacturer curve if the rail is 3.3 V, the LED is high power, or the part is infrared.

A resistor is not a current source

Warning
If the supply sags, the LED Vf shifts with temperature, or several LEDs are paralleled, the current will move. Use the board as a bench starting point, then measure.

Bibliographic References