LED Resistor Calculator
Calculate the resistor needed for an LED circuit
Find the right resistor for your LED
R = (Vs - Vf) / IWhat Is an LED Resistor Calculator?
LEDs (Light Emitting Diodes) require a current-limiting resistor to operate safely. Without it, the LED draws too much current, overheats, and burns out quickly. The resistor drops the extra voltage between the supply and the LED's forward voltage, keeping the current at a safe level for the LED.
The LED resistor calculator takes your supply voltage, the LED's forward voltage drop, and the desired forward current, then computes the minimum resistor value you need. It also shows the nearest standard E12 or E24 resistor value, so you can grab one from your parts bin without needing an exact match.
How to Use This Calculator
- Enter the supply voltage (Vs) — the voltage of your power source (e.g., 5 V for USB, 9 V for a battery).
- Enter the LED forward voltage (Vf) — typically 1.8–2.2 V for red/yellow LEDs, 2.8–3.4 V for blue/white/green LEDs.
- Enter the desired forward current (If) — usually 10–20 mA for standard 5 mm LEDs.
- Click Calculate to see the required resistor value in ohms and the nearest standard value.
Formula & Explanation
R = (Vs - Vf) / IfVs = supply voltage (V), Vf = LED forward voltage (V), If = forward current (A). Example: (5 V − 2 V) / 0.02 A = 150 Ω. Always round up to the next standard value to avoid exceeding the LED's rated current.
Worked Examples
Example 1 — Red LED on 5 V USB
Vs = 5 V, Vf = 2.0 V, If = 20 mA = 0.02 A. R = (5 − 2) / 0.02 = 150 Ω. Use a 150 Ω or 180 Ω standard resistor.
Example 2 — Blue LED on 9 V Battery
Vs = 9 V, Vf = 3.2 V, If = 15 mA = 0.015 A. R = (9 − 3.2) / 0.015 = 386.7 Ω. Use a 390 Ω standard resistor.
Example 3 — White LED on 3.3 V Logic
Vs = 3.3 V, Vf = 3.0 V, If = 10 mA = 0.01 A. R = (3.3 − 3.0) / 0.01 = 30 Ω. Use a 33 Ω standard resistor.