English tools / Electronics

LED resistor calculator

Find the current-limiting resistor for one or more LEDs from the supply voltage, LED color and current, with the closest E24 value and the power rating you need.

Find the resistor

Vs R LED × n

Wrong result or a typo? Send feedback

Why an LED needs a resistor

An LED’s current rises very steeply with voltage. A little above its forward voltage, the current can grow large enough to destroy it. A resistor in series takes up the extra voltage and limits the current to a safe value.

How to calculate the resistor

R = (Vs − Vf × n) ÷ I

Vs is the supply voltage, Vf the LED’s forward voltage, n the number of LEDs in series and I the current you want. For one red LED (Vf about 2 V) at 20 mA from 5 V: (5 − 2) ÷ 0.02 = 150 Ω.

If the exact value isn’t a standard part, pick the next higher one, so the current ends up slightly lower. The resistor dissipates (Vs − Vf × n) × I; choose a power rating with at least twice that.

Common values at 20 mA

SupplyLEDsExactE24 value
5 V1 red (2 V)150 Ω150 Ω
5 V1 blue or white (3.2 V)90 Ω91 Ω
3.3 V1 red (2 V)65 Ω68 Ω
12 V1 red (2 V)500 Ω510 Ω
12 V1 white (3.2 V)440 Ω470 Ω
12 V3 white in series120 Ω120 Ω

The forward voltages for each color are typical values. Real parts vary, so check your LED’s datasheet.

Frequently asked questions

What current should I use?

Most 3 mm and 5 mm indicator LEDs are rated for 20 mA, but 5 to 10 mA is usually bright enough for an indicator and saves power. High-power LEDs need much more current; check the datasheet and consider a constant-current driver.

Can LEDs in parallel share one resistor?

It’s best not to. Forward voltages differ slightly between LEDs, so in parallel most of the current flows through the one with the lowest forward voltage, which then wears out sooner. Give each LED its own resistor, or wire them in series.

Does the resistor go on the anode or cathode side?

Either. The resistor and LED are in the same series loop, so the current is the same whichever side the resistor is on.