LED Resistor CalculatorR = (Vs − Vf) ÷ I

An LED needs a series resistor to limit its current: R = (Vsupply − Vf) ÷ ILED. A red LED (2.0 V) at 20 mA on a 5 V supply needs (5 − 2) ÷ 0.02 = 150 Ω. Enter the supply voltage, the LED’s forward voltage and current, and how many LEDs share the resistor in series. You get the exact resistor, the next standard E12 value, the power rating it needs and the real current with that part.

Formula verified against OpenStax — University Physics, Volume 2 · Wikipedia — LED circuit

Manzoor AhmadBy Manzoor Ahmad · Pharmacist & calculator developer
Reviewed & updated

LED circuit

Use the forward voltage (Vf) and current from the LED’s datasheet if you have it.

Quick presets
Series circuit: supply, current-limiting resistor and LED(s), with the LED coloured by its forward voltage.
Result
—

Step-by-step working

    What is led resistor?

    An LED resistor (current-limiting resistor) is placed in series with a light-emitting diode to set its current to a safe value. LEDs drop a nearly fixed forward voltage, so the resistor takes up whatever voltage is left over.

    It’s the first calculation in almost every electronics project, from an Arduino blink sketch to dashboard lighting.

    Quick answers

    What resistor do I need for an LED on 5V?

    For a red LED at 20 mA: (5 − 2) ÷ 0.02 = 150 Ω. For a white or blue LED (3.2 V): (5 − 3.2) ÷ 0.02 = 90 Ω, so use 100 Ω.

    What resistor do I need for an LED on 12V?

    A single red LED at 20 mA needs (12 − 2) ÷ 0.02 = 500 Ω; use 560 Ω. Putting 3 white LEDs in series cuts it to 120 Ω and wastes far less power.

    What wattage resistor do I need for an LED?

    Calculate I²R and choose at least double. Most single-LED circuits need under 100 mW, so a ¼ W resistor is plenty.

    Can I use one resistor for multiple LEDs?

    Yes in series, sharing the same current. For parallel LEDs, give each its own resistor. The parallel resistor calculator shows why the current wouldn’t split evenly.

    LED resistor formula

    R = (Vs − n·Vf) ÷ IPR = I²RIactual = (Vs − n·Vf) ÷ Rstd

    Choose the resistor’s power rating at least twice the calculated dissipation so it runs cool.

    SymbolMeaningSI unit
    VsSupply voltageV
    VfLED forward voltageV
    nNumber of LEDs in series—
    IDesired LED currentA
    RSeries resistorΩ
    PRResistor power dissipationW

    How to choose a resistor for an LED

    1. Look up Vf and I on the LED datasheet (typical: 2 V and 20 mA for red).
    2. Subtract the total LED voltage from the supply voltage.
    3. Divide by the current in amps to get the resistance.
    4. Round up to the next standard value and pick a power rating at least 2× I²R.

    Worked example: three white LEDs on 12 V

    Three white LEDs (Vf = 3.2 V each) run in series from a 12 V supply at 20 mA.

    Voltage left for the resistor = 12 − 3 × 3.2 = 2.4 V
    R = 2.4 ÷ 0.020 = 120 Ω (an E12 value)
    P = 0.020² × 120 = 0.048 W → a ⅛ W resistor is fine

    A single red LED on a 5 V Arduino pin needs (5 − 2) ÷ 0.02 = 150 Ω, which dissipates 60 mW.

    Typical LED forward voltages

    Typical values at about 20 mA; always check the datasheet.

    LED colourForward voltage (Vf)Resistor for 5 V at 20 mA
    Infrared1.2–1.5 V≈ 180 Ω
    Red1.8–2.2 V150 Ω
    Orange / yellow2.0–2.2 V150 Ω
    Green (standard)2.0–2.4 V150 Ω
    Green (bright) / blue2.8–3.4 V100 Ω
    White2.8–3.4 V100 Ω
    UV3.1–4.4 V56–100 Ω

    Common mistakes to avoid

    • Connecting an LED straight to a supply. Without a resistor, current runs away and the LED fails, sometimes instantly.
    • Sharing one resistor between parallel LEDs. Small Vf differences make one LED hog the current. Give each branch its own resistor.
    • Rounding the resistor down. A smaller resistor means more current. Round up to stay safe.
    Manzoor Ahmad

    Manzoor Ahmad

    Pharmacist turned Web Developer & Calculator Engineer · 13+ years in web development

    I’m a pharmacist by training who turned into a full-time tech geek, and for 13+ years I’ve designed and coded web tools. My pharmacy degree included physical pharmacy and pharmaceutics — states of matter, heat, flow and reaction kinetics — so the physics behind these tools is familiar ground, not a new hobby.

    I’m not a physicist, so I don’t ask you to take my word for it: every formula on this page is traced to an open university textbook or NIST reference data, and the calculator is tested against published worked examples before it goes live. Spot an error? Tell me and it will be fixed and dated on the next update.

    LED Resistor Calculator: frequently asked questions

    An LED’s current rises steeply with a small increase in voltage. A series resistor sets the current and stops thermal runaway that would destroy the LED.

    R = (Vsupply − Vforward) ÷ ILED, with the current in amps.

    The LED is dimmer but safe. Too small a resistor overdrives the LED and shortens its life.

    Yes, as long as the supply voltage exceeds the sum of their forward voltages with some headroom, typically 1–2 V for the resistor.

    For high-power LEDs (350 mA and up) or battery-powered designs where efficiency matters, yes. A resistor is fine for indicator LEDs.

    References & sources

    1. OpenStax — University Physics, Volume 2 — Ch. 9.4, Ohm’s Law
    2. Wikipedia — LED circuit — series resistor design
    3. SparkFun — Light-Emitting Diodes (LEDs) — practical LED wiring

    Disclaimer: This calculator is an educational tool built on idealised textbook models. It is not a substitute for professional engineering or safety calculations.