Rate this calculator

LED Resistor Calculator

Calculate the current-limiting resistor for any LED. Nearest E24 standard value included.

Component Values

V
V
mA

Results

Exact R value150 Ω
Nearest E24 standard150 Ω✓ E24
Actual If (with E24 R)20.0 mA
Power dissipation (exact R)60.0 mW
Power dissipation (E24 R)60.0 mW
Recommended wattage1/8 W

✓ Standard 1/4W resistor is fine

+5 V150 ΩVf = 2 V20 mA

LED + Current-Limiting Resistor

How to calculate the LED resistor

When to use this: Use this any time you're connecting an LED to a voltage source. Even if you know the resistor value from memory, always verify the wattage rating — especially on 12V or higher supplies where the resistor dissipates significantly more power than at 5V.

An LED is a diode, not a resistor. Once its forward voltage threshold is exceeded, its internal resistance drops to near zero and current rises exponentially with any additional voltage. Without a series resistor, it's essentially a short circuit to your supply. The resistor's job is to absorb the difference between Vcc and Vf and limit current to a safe value.

The formula is R = (Vcc − Vf) / If. Vcc is your supply voltage, Vf is the LED's forward voltage (from the datasheet or use the typical values for the LED color), and If is the desired forward current in amperes. For a standard red LED on a 5V Arduino pin: Vf ≈ 2.0V, If = 20mA → R = (5 − 2.0) / 0.02 = 150Ω.

Forward voltage varies significantly with LED color. Red, orange, and yellow LEDs have Vf around 1.8–2.2V. Standard green is 2.0–2.5V. Blue, white, and high-brightness green are 3.0–3.6V. Infrared LEDs are lower, 1.0–1.5V. Always check the datasheet — using the wrong Vf can put you off by 50Ω or more on the resistor value.

On wattage: the power dissipated in the resistor is P = (Vcc − Vf) × If. For a 5V supply with a red LED at 20mA: 3V × 0.02A = 60mW. A standard 1/4W resistor handles this easily. But for a 12V supply with a red LED at 20mA: 10V × 0.02A = 200mW — now you need a 1/2W or 1W resistor. Always calculate power, don't assume.

Some people try to connect LEDs directly to 3.3V logic without a resistor because 'the voltage is close to Vf anyway'. This is a bad habit. Forward voltage varies by ±0.3V between batches. A unit with Vf = 2.8V on a 3.3V rail leaves 0.5V across zero resistance — catastrophic current. Even a 33Ω or 47Ω resistor limits the current to a safe range.

Nearest E24 standard

R = (Vcc − Vf) / If

Power dissipation (exact R)

P = If² × R

Key Points

  • Always use a standard E24/E12 value: exact values rarely exist
  • Size the resistor wattage at ≥2× the calculated power
  • Typical If for indication LEDs: 5–20 mA
  • High-brightness LEDs may require 30–350 mA

Typical Vf Values

  • Red / Orange / Yellow: 1.8–2.2 V
  • Green (standard): 2.0–2.5 V
  • Blue / White / Green (HB): 3.0–3.5 V
  • IR (850–950 nm): 1.0–1.5 V

Practical Examples

Arduino (5V) + red LED

Standard red LED on Arduino GPIO pin (5V supply, 20mA target current).

R = (5 − 2) / 0.02 = 150 Ω (E24: 150 Ω) — Power: 60 mW

Raspberry Pi (3.3V) + red LED

Red LED on Raspberry Pi GPIO (3.3V supply). Use 10mA to stay within GPIO current limits.

R = (3.3 − 2) / 0.01 = 130 Ω (E24: 130 Ω) — Power: 13 mW

12V car supply + blue LED

Blue LED on a 12V car or bench supply. Higher voltage means more power in the resistor — check the wattage!

R = (12 − 3.2) / 0.02 = 440 Ω (E24: 430 Ω) — Power: 176 mW

Common Values Reference

LED ColorTypical VfTypical IfR (5V)R (12V)
Red1.8–2.2 V20 mA150 Ω510 Ω
Orange2.0–2.2 V20 mA150 Ω510 Ω
Yellow2.0–2.2 V20 mA150 Ω510 Ω
Green (standard)2.0–2.5 V20 mA130 Ω470 Ω
Blue3.0–3.5 V20 mA91 Ω430 Ω
White3.0–3.5 V20 mA91 Ω430 Ω
IR (850–950 nm)1.0–1.5 V20 mA180 Ω560 Ω
UV (395 nm)3.3–3.7 V20 mA82 Ω430 Ω

Multiple LEDs in series: one resistor for all

When LEDs are in series, the same current flows through all of them. The total forward voltage is the sum of individual Vf values, and you only need one resistor:

R = (Vcc − (Vf₁ + Vf₂ + … + Vfₙ)) / If

Make sure Vcc is greater than the sum of all Vf values. Example: three blue LEDs in series on a 12V supply, target 20mA: R = (12 − 3 × 3.2V) / 0.02 = (12 − 9.6) / 0.02 = 120Ω. Power in resistor = 2.4V × 0.02A = 48mW (standard 1/4W is fine).

Parallel LED strings each need their own resistor — never share one resistor between parallel branches. Vf varies slightly between LEDs, so one branch will always draw more current than the other, eventually burning out. Individual resistors per branch ensure equal current sharing.

High-voltage supplies: mind the wattage

Most of the resistor's power is dissipated as heat, and this scales quickly with supply voltage. Compare:

Supply (Vcc)LED (Vf)IfRPower in RMin wattage
3.3V2.0V (red)10mA130Ω13mW1/8W
5V2.0V (red)20mA150Ω60mW1/4W
12V2.0V (red)20mA500Ω200mW1/2W
24V3.2V (blue)20mA1.04kΩ416mW1W
48V3.2V (blue)20mA2.24kΩ896mW2W

At 12V and above, a single LED circuit wastes significant power in the resistor. For efficiency at higher voltages, consider putting multiple LEDs in series to use more of the available voltage, or switching to a constant-current LED driver IC.

Formula Reference

LED current limiting resistor: R = (Vs – Vf) / If P_R = (Vs – Vf) × If = If² × R For multiple LEDs in series: R = (Vs – n×Vf) / If Typical LED forward voltages (Vf): Red: 1.8–2.2V | Yellow: 2.0–2.2V | Green: 2.0–3.5V Blue: 3.0–3.5V | White: 3.0–3.5V | IR (850nm): 1.2–1.6V

LED Reference Table

ColorVf (typ)If (typ)IntensityPackage
Red2.0V20mA2000 mcd5mm, SMD 0805
Orange2.0V20mA1500 mcd5mm
Yellow2.1V20mA1200 mcd5mm
Green2.2V20mA3000 mcd5mm
Blue3.2V20mA4000 mcd5mm
White3.2V20mA5000 mcd5mm, SMD 3528
UV 395nm3.4V20mA5mm
IR 850nm1.4V100mA50mW/sr5mm, remote control

Worked Examples

Example A — Arduino 5V, red LED

Vf=2.0V, If=20mA

R = (5 – 2.0) / 0.020 = 150Ω → use 150Ω (E12 standard)
P = 0.020² × 150 = 60mW → ¼W resistor OK

Example B — 3.3V MCU, blue LED

Vf=3.2V, If=10mA

R = (3.3 – 3.2) / 0.010 = 10Ω → use 10Ω (keep If low for MCU pin limit)
GPIO max current: most MCUs 8–16mA per pin. Keep If ≤ 8mA for safety.

Example C — 12V supply, 3× white LEDs in series

3× Vf = 3×3.2 = 9.6V

R = (12 – 9.6) / 0.020 = 120Ω
P = (12–9.6)×0.020 = 48mW → ¼W resistor, 120Ω E12 ✓

Design Tips

Never connect LEDs directly to voltage sources without a resistor — they WILL fail. For constant-current LED drivers (preferred for high-power LEDs): use PWM dimming, not resistors. SMD LEDs: 0402 typically limited to 5mA, 0603/0805 up to 20mA. Parallel LEDs need individual resistors — never share one resistor between parallel LEDs.

Did you know? The first practical LED was invented by Nick Holonyak Jr. in 1962 at General Electric. Early LEDs only emitted red light. Shuji Nakamura's invention of the blue LED in 1993 — which enabled white LEDs — earned him the 2014 Nobel Prize in Physics.

✓ Copied to clipboard