LED Resistors: Protecting Your Components
Learn why LEDs need resistors, how to prevent your Arduino projects from blowing up, and use our free LED Resistor Calculator.
Related Calculator
Use the LED Resistor Calculator | Series, Parallel & Color Code Solver to apply what you learn in this guide.
On this page
Every standard LED requires a series current-limiting resistor (or an active constant-current driver) whenever powered from a fixed-voltage source such as a 5 V USB rail, a 9 V battery, or a 3.3 V microcontroller pin. Because an LED's internal resistance drops precipitously once applied voltage exceeds its forward voltage threshold (V_f), an unprotected LED acts nearly like a dead short and destroys itself in milliseconds.
By applying Ohm's Law, the ideal series resistance equals the excess supply voltage divided by your target forward current: R = (V_s − V_f) / I_f. You then select the nearest higher standard E12 or E24 resistor value and verify that the resistor's wattage rating exceeds twice its calculated heat dissipation. Use our LED Resistor Calculator to compute exact resistance, standard component recommendations, and power dissipation automatically.
Core LED Circuit Equations and Parameter Definitions
Designing a reliable indicator or illumination circuit relies on four straightforward relationships derived from Kirchhoff's Voltage Law and Joule heating:
Single LED Resistance: R (Ω) = (V_s − V_f) / I_f
Series String Resistance: R (Ω) = (V_s − n × V_f) / I_f
Actual Circuit Current: I_actual (A) = (V_s − V_f) / R_std
Resistor Power Loss: P_R (W) = (V_s − V_f) × I_actual = I_actual² × R_std
Minimum Resistor Rating: P_rated ≥ 2 × P_R
Check four parameters against component datasheets before soldering:
- Source Voltage (
V_s): The rail voltage in volts (V). Regulated 3.3 V or 5.0 V rails stay tight, whereas batteries and automotive systems swing widely—a fresh 9 V alkaline cell reads ~9.5 V, and a running car alternator reaches 14.4 V. - LED Forward Voltage (
V_f): Typical drops are1.8–2.1 Vfor red/amber,2.1–2.4 Vfor yellow/standard green, and3.0–3.4 Vfor blue, emerald green, and white LEDs. - Target Forward Current (
I_f): Expressed in amperes (20 mA = 0.020 A). Most 5 mm indicator LEDs max out at 20–30 mA, though modern high-efficiency dies reach full brightness at5–15 mA. - Standard Value (
R_std): Resistors follow logarithmic E12 (10%) or E24 (5%) steps. Always round up to the next standard value aboveR.
Step-by-Step Worked Example: 12 V Supply with Single vs. Series LEDs
Suppose you want to power a white 5 mm LED (V_f = 3.2 V, I_f = 20 mA = 0.020 A) from a regulated 12.0 V DC supply.
Single LED on 12.0 V
- Resistor voltage drop:
V_R = 12.0 V − 3.2 V = 8.8 V. - Ideal resistance:
R = 8.8 V / 0.020 A = 440 Ω. - Select standard resistor (round up): Nearest E12/E24 value is 470 Ω.
- Verify actual current:
I_actual = 8.8 V / 470 Ω = 0.01872 A = 18.7 mA, safely 6.4% below the 20 mA limit. - Calculate resistor heat:
P_R = 8.8 V × 0.01872 A = 0.1647 W(164.7 mW). - Check wattage rating: With a 2× thermal derating factor (
0.1647 × 2 = 0.329 W), a1/2 W(0.50 W) resistor stays cooler in enclosed housings than a1/4 Wpart running at 66% capacity.
Three Identical LEDs in Series on 12.0 V
Wiring three white LEDs in series sharply cuts wasted heat:
- Sum LED drops:
3 × 3.2 V = 9.6 V. - Resistor voltage drop:
V_R = 12.0 V − 9.6 V = 2.4 V(retaining adequate headroom above 1.5 V). - Resistance:
R = 2.4 V / 0.020 A = 120 Ω(an exact E12/E24 value). - Resistor power:
P_R = 2.4 V × 0.020 A = 0.048 W(48 mW).
One 1/4 W 120 Ω resistor drives all three LEDs while dissipating under one-third the heat of a single-LED circuit.
Standard LED Resistor Reference Table
The benchmark table below assumes standard E12/E24 resistor selection rounded up for component safety, with power dissipated computed at I_actual.
Source (V_s) |
LED Color (V_f) |
Target I_f |
Calculated R |
Standard R_std |
Actual I_actual |
Resistor Heat (P_R) |
|---|---|---|---|---|---|---|
| 3.3 V (ESP32 GPIO) | Red (2.0 V) | 10 mA | 130 Ω | 150 Ω | 8.7 mA | 11.3 mW (1/8 W) |
| 5.0 V (Arduino/USB) | Red (2.0 V) | 20 mA | 150 Ω | 150 Ω | 20.0 mA | 60.0 mW (1/4 W) |
| 5.0 V (Arduino/USB) | Green (2.2 V) | 15 mA | 187 Ω | 220 Ω | 12.7 mA | 35.6 mW (1/4 W) |
| 5.0 V (Arduino/USB) | Blue/White (3.2 V) | 20 mA | 90 Ω | 100 Ω | 18.0 mA | 32.4 mW (1/4 W) |
| 9.0 V (Battery) | Red (2.0 V) | 20 mA | 350 Ω | 390 Ω | 17.9 mA | 125.6 mW (1/2 W) |
| 12.0 V (Regulated PSU) | Blue/White (3.2 V) | 20 mA | 440 Ω | 470 Ω | 18.7 mA | 164.7 mW (1/2 W) |
Practical Engineering Pitfalls and Design Caveats
Even with exact Ohm's Law math, four real-world pitfalls frequently damage LEDs or microcontrollers:
- GPIO Pin Limits: An Arduino Uno pin handles 20 mA continuous (40 mA absolute max), whereas 3.3 V boards (Raspberry Pi, ESP32, STM32) cap pins at 12–16 mA and restrict total package current. Size indicator resistors for 5–10 mA or switch higher loads via an NPN transistor or N-channel MOSFET.
- Parallel LED Current Hogging: Sharing one resistor across parallel LEDs fails because
V_fvaries slightly and drops as temperature rises (−2 mV/°C). The warmest branch draws progressively more current until thermal runaway destroys the array. Always give each parallel branch its own resistor. - Unregulated Rails: Sizing an automotive indicator for
12.0 Vleaves no margin when the alternator charges at14.4 V. Always use peak expected rail voltage forV_s. - High-Power Emitters (>100 mA): Above 100 mA (
350–3,000 mAillumination LEDs), series resistors waste excessive heat and allow current drift; use a switching constant-current LED driver instead.
Frequently Asked Questions
What happens if you connect an LED to a battery without a resistor?
An LED has an exponential voltage-current curve above its forward voltage threshold (Vf). Without a series resistor or constant-current driver to limit current, even a fraction of a volt above Vf causes current to surge dramatically, overheating the semiconductor junction, fracturing the bond wire, and destroying the LED within milliseconds.
Should I round up or down when picking a standard resistor value?
Always round up to the next standard E12 or E24 resistor value above your calculated minimum. Rounding down increases forward current above your design target, shortening LED lifespan or exceeding microcontroller GPIO pin limits. Moving up slightly (for example, from 440 ohms to 470 ohms) trims current by about 6% with virtually no visible loss in brightness.
Can multiple LEDs share a single current-limiting resistor?
LEDs wired in series can share one resistor because identical current flows through every component in a series loop, provided the supply voltage exceeds the sum of all forward voltages plus 1.5 V to 2.0 V of resistor headroom. Never wire parallel LEDs to one shared resistor: slight manufacturing differences in forward voltage cause one LED to hog current and enter thermal runaway.
How do I choose the right resistor wattage rating?
Multiply the voltage dropped across the resistor by the actual LED current in amps: P = (Vs − Vf) × I_actual. Then apply a 2× thermal safety factor so the resistor stays cool and reliable. For example, if the resistor dissipates 0.16 W, a 0.25 W (1/4 W) resistor runs warm near 64% capacity, whereas a 0.5 W (1/2 W) resistor provides ample thermal margin.
Why do blue and white LEDs need smaller resistors than red LEDs at the same supply voltage?
Blue and white LEDs use wider-bandgap semiconductors with a forward voltage around 3.0 V to 3.4 V, compared to 1.8 V to 2.1 V for standard red LEDs. Because more of the supply voltage drops across a blue LED itself, less excess voltage remains for the resistor to absorb, yielding a lower required resistance for the same target current.