LED Resistor Calculator

Enter your supply voltage and LED. Get the resistor value to buy, the real current with it and the power rating you need.

Free, no sign-upInstant resultsUpdated October 2026
V
mA
Standard 5 mm LEDs: 10–20 mA. Check the datasheet's max current.
V
From the LED datasheet (Vf at your current).
Standard series
Resistor to use
–
How we calculated this

    For estimating and educational purposes only. Results are approximate and are not a substitute for a licensed professional, the manufacturer's instructions or your local code. Disclaimer

    Embed this calculator on your site

    Free for any website or blog. Copy the code below and paste it into an HTML block. Keep the credit link.

    Why an LED needs a resistor

    An LED has an almost fixed forward voltage (Vf). Above it, current rises very steeply, so the LED must be fed through something that limits current. For indicator LEDs the simplest option is a series resistor that drops the extra voltage.

    R = (Vsupply − n × Vf) ÷ I P(resistor) = I² × R

    Worked examples

    Red LED (Vf ≈ 2.0 V) at 20 mA on 5 V: (5 − 2) ÷ 0.020 = 150 Ω, which is a standard E12 value. The resistor dissipates 0.02² × 150 = 0.06 W, so a common 1/8 W or 1/4 W part is fine.

    Three white LEDs (3.2 V each) in series on 12 V: (12 − 9.6) ÷ 0.020 = 120 Ω, wasting only 48 mW. One white LED alone on 12 V needs 440 Ω (use 470 Ω) and wastes about 0.16 W: putting LEDs in series is much more efficient.

    Rules of thumb

    • Always round up to the next standard value: slightly less current, never more.
    • Choose a resistor rated at least 2× the power it dissipates.
    • Do not wire LEDs in parallel on one resistor: give each string its own resistor.
    • Arduino and ESP32 pins should stay well below their limits: about 20 mA per pin on an Uno, much less on many 3.3 V boards.

    Frequently asked questions

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

    For a red LED at 20 mA, 150 Ω. For blue or white (Vf ≈ 3.2 V) at 20 mA, 90 Ω exact, so use 100 Ω.

    Can I use a higher resistor value?

    Yes. A higher value means less current and a dimmer, cooler LED. Modern LEDs are often bright enough at 5–10 mA.

    What happens without a resistor?

    The current is limited only by the supply and wiring, so the LED usually overheats and fails within seconds or minutes.