LED Resistor Calculator
Calculate the current-limiting resistor for any LED. Nearest E24 standard value included.
Component Values
Results
✓ Standard 1/4W resistor is fine
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) / IfPower dissipation (exact R)
P = If² × RKey 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
Standard red LED on Arduino GPIO pin (5V supply, 20mA target current).
R = (5 − 2) / 0.02 = 150 Ω (E24: 150 Ω) — Power: 60 mW
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
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 Color | Typical Vf | Typical If | R (5V) | R (12V) |
|---|---|---|---|---|
| Red | 1.8–2.2 V | 20 mA | 150 Ω | 510 Ω |
| Orange | 2.0–2.2 V | 20 mA | 150 Ω | 510 Ω |
| Yellow | 2.0–2.2 V | 20 mA | 150 Ω | 510 Ω |
| Green (standard) | 2.0–2.5 V | 20 mA | 130 Ω | 470 Ω |
| Blue | 3.0–3.5 V | 20 mA | 91 Ω | 430 Ω |
| White | 3.0–3.5 V | 20 mA | 91 Ω | 430 Ω |
| IR (850–950 nm) | 1.0–1.5 V | 20 mA | 180 Ω | 560 Ω |
| UV (395 nm) | 3.3–3.7 V | 20 mA | 82 Ω | 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ₙ)) / IfMake 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) | If | R | Power in R | Min wattage |
|---|---|---|---|---|---|
| 3.3V | 2.0V (red) | 10mA | 130Ω | 13mW | 1/8W |
| 5V | 2.0V (red) | 20mA | 150Ω | 60mW | 1/4W |
| 12V | 2.0V (red) | 20mA | 500Ω | 200mW | 1/2W |
| 24V | 3.2V (blue) | 20mA | 1.04kΩ | 416mW | 1W |
| 48V | 3.2V (blue) | 20mA | 2.24kΩ | 896mW | 2W |
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.6VLED Reference Table
| Color | Vf (typ) | If (typ) | Intensity | Package |
|---|---|---|---|---|
| Red | 2.0V | 20mA | 2000 mcd | 5mm, SMD 0805 |
| Orange | 2.0V | 20mA | 1500 mcd | 5mm |
| Yellow | 2.1V | 20mA | 1200 mcd | 5mm |
| Green | 2.2V | 20mA | 3000 mcd | 5mm |
| Blue | 3.2V | 20mA | 4000 mcd | 5mm |
| White | 3.2V | 20mA | 5000 mcd | 5mm, SMD 3528 |
| UV 395nm | 3.4V | 20mA | — | 5mm |
| IR 850nm | 1.4V | 100mA | 50mW/sr | 5mm, remote control |
Worked Examples
Vf=2.0V, If=20mA
R = (5 – 2.0) / 0.020 = 150Ω → use 150Ω (E12 standard)
P = 0.020² × 150 = 60mW → ¼W resistor OK
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.
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.