LED Resistor Calculator

Calculate the resistor needed for an LED circuit

LED Resistor Calculator

Find the right resistor for your LED

Formula
R = (Vs - Vf) / I

What 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

  1. Enter the supply voltage (Vs) — the voltage of your power source (e.g., 5 V for USB, 9 V for a battery).
  2. 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.
  3. Enter the desired forward current (If) — usually 10–20 mA for standard 5 mm LEDs.
  4. Click Calculate to see the required resistor value in ohms and the nearest standard value.

Formula & Explanation

R = (Vs - Vf) / If

Vs = 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.

Frequently Asked Questions

What happens if I skip the resistor?
Without a current-limiting resistor, the LED will draw as much current as the circuit allows. This typically destroys the LED within seconds and can damage the power source or microcontroller output pin.
Can I use one resistor for multiple LEDs in parallel?
It is strongly discouraged. LEDs have slightly different forward voltages due to manufacturing variance, so one LED will hog current while others dim. Use individual resistors per LED for reliability.
What is the LED forward voltage?
Forward voltage (Vf) is the voltage drop across the LED when it conducts. It depends on the LED color: red/yellow ≈ 1.8–2.2 V, green ≈ 2.0–2.5 V, blue/white ≈ 2.8–3.4 V. Check your LED's datasheet for the exact value.
How much current does a standard LED need?
Most 5 mm through-hole LEDs are rated for 20 mA continuous. Running them at 10–15 mA is common for longer life and lower heat. High-power LEDs may need hundreds of milliamps — always check the datasheet.
Does it matter if I use a slightly higher resistor value?
Yes — a higher resistor means less current and a slightly dimmer LED, but the LED stays safe. Using a lower resistor than calculated risks exceeding the LED's current rating and shortening its life.