LED Resistor Calculator
Find the correct resistor value to safely drive an LED. Enter supply voltage, LED forward voltage, and desired current to calculate the required resistance and power dissipation.
LEDs (light-emitting diodes) are nonlinear devices that need careful current control. Unlike incandescent bulbs, they don't behave like simple resistors — they have a near-vertical I-V curve where small voltage changes cause huge current swings. Connect an LED directly to a battery without limiting current, and it will draw far more current than it can handle, overheating and destroying itself in milliseconds.
The standard solution is a current-limiting resistor in series with the LED. The resistor drops the excess supply voltage above the LED's forward voltage, and limits current to a safe value. The math is Ohm's Law applied to the excess voltage: R = (V_supply − V_forward) / I_desired.
For example, a red LED with 2.0 V forward voltage at 20 mA running from a 5 V supply needs R = (5 − 2) / 0.020 = 150 Ω. This sets a stable current through the LED regardless of small variations in temperature, manufacturing, or supply voltage. The resistor also dissipates power: P = (V_supply − V_forward) × I_LED. In this example: 3 V × 0.020 A = 0.06 W = 60 mW — a small 1/4 W resistor handles it easily.
Common applications: indicator lights, panel displays, automotive lighting, decorative LED strips, traffic lights, signage, and any LED-based lighting that runs from a voltage source higher than the LED's forward voltage. The calculator handles single LEDs and series strings of multiple LEDs.
Inputs
Red: 1.8-2.2V, Green: 2.0-3.5V, Blue/White: 3.0-3.6V
Standard LED: 20mA, High-power: 350mA+
Results
Resistor Needed
150 Ω
Actual Current
20.0 mA
Power (resistor)
60.0 mW
LED Resistor Results
| Parameter | Value |
|---|---|
| Supply Voltage | 5.0 V |
| Total LED Voltage Drop | 2.0 V (1 × 2V) |
| Voltage Across Resistor | 3.00 V |
| Desired Current | 20.0 mA |
| Calculated Resistance | 150 Ω |
| Nearest Standard Resistor | 150 Ω |
| Actual Current (with standard) | 20.00 mA |
| Power Dissipated (resistor) | 60.00 mW |
| Power Dissipated (LED) | 40.00 mW |
| Total Power | 100.00 mW |
| Formula | R = (Vsupply - Vled) / Iled |
Formula
How to use this calculator
- Enter supply voltage (battery voltage, power supply output).
- Enter LED forward voltage from datasheet or color table.
- Enter desired LED current (typically 20 mA for indicators).
- Enter number of LEDs if connecting in series.
- Calculator returns required resistance and power dissipation.
- Choose next higher standard resistor value (E12 or E24 series).
- Choose resistor power rating ≥ 2× calculated power.
Worked examples
Indicator LED on Arduino
**Scenario:** Red LED on Arduino 5V output, 10 mA desired (gentle indicator). **Calculation:** R = (5 − 2.0) / 0.010 = 300 Ω. Standard value: 330 Ω (E12). P = 3 × 0.010 = 30 mW. **Result:** Use 330 Ω, 1/4 W resistor. Standard Arduino LED indicator value. Slightly less current than calculated (due to rounding up) means slightly dimmer but safer LED.
3 white LEDs in series
**Scenario:** 3 white LEDs (V_f = 3.2 V each) for a project lamp running on 12 V battery at 20 mA. **Calculation:** Total V_f = 9.6 V. V_resistor = 12 − 9.6 = 2.4 V. R = 2.4 / 0.020 = 120 Ω. P = 2.4 × 0.020 = 48 mW. **Result:** Use 120 Ω, 1/4 W resistor. With 3 LEDs in series, the resistor only drops 2.4 V (vs 8.8 V if a single LED) — much more efficient. Most of supply power goes to light, not heat in resistor.
High-power LED — DON'T use resistor
**Scenario:** 3W white LED (3.4 V, 700 mA) on 12 V supply. What resistor? **Calculation:** R = (12 − 3.4) / 0.700 = 12.3 Ω. P_resistor = 8.6 × 0.700 = 6 W. **Result:** Resistor would dissipate 6W — wasting 67% of total power as heat. Worse, even small V_supply variation causes large current change. Use a switching current regulator (e.g., LM3414) instead. Efficient (~90%), regulates exactly 700 mA, allows full LED brightness without heat issues.
When to use this calculator
**Use the LED resistor formula for:**
- **Indicator LEDs**: low-power status lights. - **Panel meters**: indicator panels, control boards. - **Decorative lighting**: small projects, LED strips. - **Automotive lights**: dashboard, brake lights (modified for 12V system). - **Prototyping**: quick LED testing without dedicated drivers.
**When NOT to use simple resistors:**
- **High-power LEDs (>50 mA)**: too inefficient; voltage drop wastes power. - **Battery-powered devices**: efficiency matters; use constant-current driver. - **Variable supply voltage**: current changes with V_supply. - **Temperature-sensitive applications**: V_f changes with temperature; current shifts. - **Long strings of LEDs**: V_f tolerances stack; current can vary widely.
**Better alternatives for these cases:**
- **Linear current regulator**: cheap, simple (LM317 in current-source mode). - **Switching current regulator**: efficient for high power. - **Dedicated LED driver IC**: best for many applications. - **Buck/boost converters with current sense**: complete control over LED current.
**Temperature considerations:**
V_f decreases ~−2 mV/°C as LED heats up. In a series-resistor circuit: - LED warms → V_f drops → resistor voltage rises → current increases → more heat. - Positive feedback! Can lead to thermal runaway.
Solution: oversize resistor slightly to limit runaway potential. Or use active regulation.
**Standard resistor series:**
- **E12**: ±10% tolerance — 12 values per decade. - **E24**: ±5% — 24 values. - **E48**: ±2% — 48 values. - **E96**: ±1% — 96 values.
Most LED projects use E12 (1%, 5%, or 10% values).
**Resistor power rating:**
Standard ratings: 1/16, 1/8, 1/4, 1/2, 1, 2, 5, 10, 25 W.
Rule of thumb: use power rating ≥ 2× the calculated dissipation. A 60 mW load uses a 1/4 W (250 mW) resistor with comfortable margin.
**Common applications:**
- **Arduino/Raspberry Pi indicators**: 330 Ω or 1 kΩ for 5V/3.3V. - **Power-on LEDs**: typically 1-2 kΩ for 5-12V supplies. - **Multi-color indicators**: separate resistors for each color (different V_f). - **LED candle imitations**: very low current (~1 mA) for soft glow. - **Status panels**: 8-12 LEDs with individual resistors.
**LED selection guidelines:**
- **5 mm round**: standard indicator, 20-30 mA, 1-5 mcd to 10,000+ mcd. - **3 mm round**: smaller, similar specs. - **SMD 0603/0805/1206**: surface-mount for PCBs. - **High-power**: 1W-100W, special heatsinking required. - **COB (chip-on-board)**: tightly packed arrays for high lumens.
**RGB LEDs:**
Three LEDs (red, green, blue) in one package. - Common cathode: shared negative; current sourced individually. - Common anode: shared positive; current sunk individually.
Each color needs its own resistor (different V_f). Set duty cycle per color for any color.
**Software / simulation:**
- **LTspice**: free SPICE simulator for circuit verification. - **Tinkercad Circuits**: web-based for beginners. - **Fritzing**: schematic/breadboard tool. - **CircuitJS**: real-time circuit simulator.
**Pitfalls:**
- **Using LED without resistor**: instant burnout (almost always). - **Choosing too-small resistor**: excessive current, short LED life. - **Reversing polarity**: LEDs are diodes; backwards = blocked or damaged. - **Underpowered resistor**: overheats, possibly burns/fails. - **Parallel LEDs without per-LED resistors**: uneven current. - **Using 5V resistor on 12V supply**: needs different value. - **Ignoring temperature drift**: V_f changes, current shifts.
Common mistakes to avoid
- Connecting LED without a current-limiting resistor (instant burnout).
- Forgetting LEDs are polarized (long lead = anode, short lead = cathode).
- Using same resistor value for different LED colors (V_f differs).
- Choosing resistor with insufficient power rating.
- Putting LEDs in parallel without individual resistors (uneven current).
- Not accounting for supply voltage variation (battery vs regulated).
- Driving LEDs at maximum current (reduces lifespan dramatically).
- Using simple resistor for high-power LEDs (wastes energy as heat).