LED Resistor Calculator

Instantly calculate the correct current-limiting resistor value, power rating, and colour code for any LED circuit — single or series.

REF_SYS_772_XC
INPUT_PARAMETERS
Supply Voltage (Vs)Total voltage from your power source (battery, wall adapter, etc.)12V
1V24V
Forward Voltage (Vf)Voltage drop across one LED when conducting. Typical for Red: 1.8–2.2 V.2.1V
1V5V
Forward Current (If)Desired operating current. Most standard 5mm LEDs run at 20 mA.20mA
1mA100mA
Quick presets

Standard 5mm LED

Red / Yellow: ~2.0 V · Blue / White: ~3.3 V · All @ 20 mA

SCHEMATIC_VIEWV+510 Ω
SIMULATION ACTIVE

Required Resistor

510Ω
Exact value495.0 Ω
Standard (E24)510 Ω
Power dissipation0.198 W
Min. power rating1/4 W
Resistor Colour Code5% TOLERANCE · GOLD
GREENBROWNBROWNGOLD

How to Use the LED Resistor Calculator

Follow these four steps to find the right current-limiting resistor for your LED circuit in seconds.

  1. 01

    Set your supply voltage (Vs)

    Enter the total voltage your power source provides — 3.3 V for a microcontroller pin, 5 V for USB, 9 V or 12 V for a DC adapter.

  2. 02

    Enter the LED forward voltage (Vf)

    Check your LED's datasheet or use a colour preset above. Red and yellow LEDs typically drop 2.0–2.2 V; blue, white, and UV LEDs drop 3.0–3.5 V.

  3. 03

    Choose the forward current (If)

    Most standard 5mm LEDs are rated at 20 mA. High-brightness or power LEDs may specify 30–100 mA — always check the datasheet.

  4. 04

    Read the result

    The calculator instantly displays the exact resistance, the nearest E24 standard value, minimum power rating, and the corresponding 4-band colour code.

LED Resistor Formula Explained

R = (Vs − Vf) / If
P = (Vs − Vf) × If

Ohm's Law applied to an LED circuit: the resistor must absorb the voltage difference between the supply and the LED's forward voltage. Dividing that voltage drop by the desired current gives the required resistance.

The power formula tells you how much heat the resistor will dissipate. Always choose a resistor rated for at least twice this figure — a 2× derating factor ensures safe operation and a long component life.

For a series LED string, replace Vf with Vf × n (where n = number of LEDs). The calculator handles this automatically when you switch to Series mode.

Common LED Resistor Values Reference Table

Use this table as a quick reference for standard 5mm LEDs at 20 mA. Values shown are the nearest E24 resistor.

LED ColourVf (V)If (mA)R @ 5 VR @ 9 VR @ 12 V
Red1.8 – 2.220150 Ω350 Ω496 Ω
Orange2.0 – 2.220150 Ω340 Ω490 Ω
Yellow2.0 – 2.220150 Ω340 Ω490 Ω
Green2.0 – 2.420130 Ω330 Ω480 Ω
Blue3.0 – 3.52075 Ω270 Ω420 Ω
White3.0 – 3.52075 Ω270 Ω420 Ω
UV3.0 – 3.52075 Ω270 Ω420 Ω
Infrared1.0 – 1.520175 Ω375 Ω525 Ω

* Approximate E24 standard values. Forward voltage varies by manufacturer and LED construction. Always verify against the component datasheet.

Common LED Resistor Mistakes

  • Skipping the resistor entirely

    Direct connection to a voltage source forces unlimited current. The LED will burn out in milliseconds, often taking a microcontroller GPIO pin with it.

  • Ignoring power rating

    A resistor with the right ohm value can still burn out if it cannot handle the heat. Always apply a 2× safety derating — a 0.1 W calculation needs a ¼ W part.

  • Parallel LEDs with one resistor

    Tiny Vf differences cause current imbalance. The brightest LED draws the most current, overheats first, and the cascade continues until all fail.

  • Using nominal instead of actual Vf

    LED datasheets quote a typical Vf. Junction temperature and manufacturing spread can shift this by ±0.2 V. Measure with a multimeter when precision matters.

Wiring LEDs in Series vs. Parallel

Series
One resistor for the whole string
Equal current through every LED
Consistent brightness
Supply must exceed total Vf × n
One failed LED breaks the circuit
Parallel
Each LED works independently
Easier to add or remove LEDs
Lower total voltage required
Needs one resistor per LED
Vf mismatch causes brightness variation
More components, higher cost

Frequently Asked Questions

More Engineering Calculators

Explore Ohm's Law, voltage dividers, and more electronics tools in our free engineering calculator suite.