Skip to main content

LED resistor calculator

R = (Vsupply − Vf) ÷ I. Enter your supply voltage, the LED's forward voltage and the target current — the calculator returns the resistor value, the voltage it drops and the power it must dissipate.

Frequently asked questions

How is the LED current-limiting resistor value calculated?

The resistor sets the current with R = (Vsupply − Vf) ÷ I. For a white LED (Vf ≈ 3.2 V) at 20 mA from a 5 V supply the resistor must drop 1.8 V, so R = 1.8 ÷ 0.02 = 90 Ω. The tool also shows the nearest E24 value — 91 Ω — and the actual current that value produces.

What power rating should the LED resistor have?

The resistor dissipates P = I²·R, and the tool recommends picking a part rated at roughly 2× that value. In the worked example 20 mA through 90 Ω dissipates I²R ≈ 36 mW, so a 1/4 W (250 mW) resistor has plenty of margin — but a high-current LED can need a much larger part.

What is the typical forward voltage of an LED?

Typical forward voltages used by the calculator are red 1.8–2.2 V, green and yellow 2.0–2.4 V, blue and white 3.0–3.4 V, and IR 1.2–1.5 V. Vf must stay below the supply voltage or there is nothing left for the resistor to drop — the tool warns if Vf ≥ Vsupply. Always verify against the specific LED datasheet for a production design.

Worked example

Driving a white LED (Vf ≈ 3.2 V) at 20 mA from a 5 V supply: the resistor must drop 5 − 3.2 = 1.8 V at 20 mA, so R = 1.8 ÷ 0.02 = 90 Ω. The nearest E24 value is 91 Ω, which gives a slightly lower current of about 19.8 mA — indistinguishable by eye. The resistor dissipates I²R ≈ 0.02² × 90 ≈ 36 mW, so a 1/4 W (250 mW) part has plenty of margin.

Typical LED forward voltages

Use these as a starting point when the datasheet is not at hand — always verify against the specific LED's datasheet for a production design.

ColourForward voltage (Vf)Typical current
Red1.8–2.2 V20 mA
Green2.0–2.4 V20 mA
Yellow2.0–2.4 V20 mA
Blue3.0–3.4 V20 mA
White3.0–3.4 V20 mA
IR (infrared)1.2–1.5 V50–100 mA

Assumes a single LED and a fixed supply. For brightness matching or high-power LEDs use the forward-voltage curve from the datasheet. ICBOMS provides this tool for reference only.