Teach Your Kid Electronics

Articles

LED Resistor Calculator: Which Resistor Does My LED Need?

An LED is a tiny light that needs only a trickle of electricity. Connect one straight to a battery and too much current rushes through: it flashes brightly and burns out. A resistor in the loop limits the current to a safe amount. But which one? The calculator below works it out, and the rest of this page explains why.

The calculator

Pick your battery, your LED color and how bright you want it:

🧮 LED resistor calculator

A quick refresher: voltage, current and resistance

Electricity flowing through wires is a lot like water flowing through pipes:

  • Voltage (measured in volts, V) is the push, like the pressure from a water pump. The battery is the pump: each AA battery pushes with 1.5 volts, and three in a row push with 4.5 volts.
  • Current (measured in amps, A, or milliamps, mA) is how much is flowing, like how many cups of water pass by each second. An LED only wants about 10 mA: a tiny trickle.
  • Resistance (measured in ohms, Ω) is how much something holds back the flow, like a narrow section of pipe. A resistor is a part made to do exactly that.

More push means more flow; a narrower pipe means less. Electricity also needs a complete loop (a circuit), out of the battery’s + end and back into its − end, just like water going round and round a pipe loop.

What’s a diode?

A diode is a part that lets current flow only one way, like a one-way valve in a pipe, or a turnstile at a stadium. Push from the right direction and current flows; push from the other side and it stops.

LED stands for Light-Emitting Diode: a diode that glows when current flows through it. So an LED only works one way round:

  • The long leg (the anode) goes toward the battery’s +.
  • The short leg (the cathode), next to the flat edge of the rim, goes toward −.

Put it in backwards and it simply stays dark. Nothing breaks: just turn it around.

Every diode also takes a small “toll” from the battery’s push before current flows at all. For an LED that toll is its forward voltage: about 2 V for red and 3.2 V for blue or white. That toll is the key to working out the resistor.

The formula

The LED takes its toll (its forward voltage), and the resistor has to handle whatever push is left over:

Resistor (Ω) = (battery volts − LED volts) ÷ current (amps)

Current is usually given in milliamps (mA): one-thousandth of an amp. 10 mA is 0.010 A.

Example: a red LED on 3 AA batteries (4.5 V), at 10 mA: (4.5 − 2.0) ÷ 0.010 = 250 Ω. Resistors only come in standard sizes, so round up to the next one: 270 Ω. Rounding up means a tiny bit less current, which is always the safe direction.

Why we use 220 Ω almost everywhere

All our beginner projects run on 3 AA batteries and use a 220 Ω resistor for every LED color. Here’s what flows with 220 Ω:

Current through each LED color with a 220 Ω resistor (fresh batteries in brackets)
LED colorLED "uses"2 × AA (3.0 V)3 × AA (4.5 V)4 × AA (6.0 V)
Red2.0 V4.5 mA (5.5 mA)good11.4 mA (12.7 mA)good18.2 mA (20.0 mA)too much!
Orange2.0 V4.5 mA (5.5 mA)good11.4 mA (12.7 mA)good18.2 mA (20.0 mA)too much!
Yellow2.1 V4.1 mA (5.0 mA)good10.9 mA (12.3 mA)good17.7 mA (19.5 mA)good
Green (classic)2.2 V3.6 mA (4.5 mA)good10.5 mA (11.8 mA)good17.3 mA (19.1 mA)good
Green (bright / "true")3.1 Va tricklefaint, or off6.4 mA (7.7 mA)good13.2 mA (15.0 mA)good
Blue3.2 Va tricklefaint, or off5.9 mA (7.3 mA)good12.7 mA (14.5 mA)good
White3.2 Va tricklefaint, or off5.9 mA (7.3 mA)good12.7 mA (14.5 mA)good

Current through each LED color with a 220 Ω resistor ("new" = brand-new batteries)

  • Red uses 2.0 V

    2 × AA
    4.5 mAnew: 5.5 mAgood
    3 × AA
    11.4 mAnew: 12.7 mAgood
    4 × AA
    18.2 mAnew: 20.0 mAtoo much!
  • Orange uses 2.0 V

    2 × AA
    4.5 mAnew: 5.5 mAgood
    3 × AA
    11.4 mAnew: 12.7 mAgood
    4 × AA
    18.2 mAnew: 20.0 mAtoo much!
  • Yellow uses 2.1 V

    2 × AA
    4.1 mAnew: 5.0 mAgood
    3 × AA
    10.9 mAnew: 12.3 mAgood
    4 × AA
    17.7 mAnew: 19.5 mAgood
  • Green (classic) uses 2.2 V

    2 × AA
    3.6 mAnew: 4.5 mAgood
    3 × AA
    10.5 mAnew: 11.8 mAgood
    4 × AA
    17.3 mAnew: 19.1 mAgood
  • Green (bright / "true") uses 3.1 V

    2 × AA
    a tricklefaint, or off
    3 × AA
    6.4 mAnew: 7.7 mAgood
    4 × AA
    13.2 mAnew: 15.0 mAgood
  • Blue uses 3.2 V

    2 × AA
    a tricklefaint, or off
    3 × AA
    5.9 mAnew: 7.3 mAgood
    4 × AA
    12.7 mAnew: 14.5 mAgood
  • White uses 3.2 V

    2 × AA
    a tricklefaint, or off
    3 × AA
    5.9 mAnew: 7.3 mAgood
    4 × AA
    12.7 mAnew: 14.5 mAgood

Red, yellow and classic green get about 10–13 mA (bright), and blue and white get around 6 mA, still plenty bright, because those LEDs are very efficient. On 3 AA batteries, nothing goes over the 20 mA most LEDs can take, so one resistor value works for everything: one less thing to get wrong. The 4 AA column shows why more batteries need a bigger resistor: our 555 timer projects run on 4 AA batteries and use 330 Ω.

Common questions

Can I use a bigger resistor? Yes. The LED will just be dimmer. Too big (like 100 kΩ) and it may look off.

Can I use a smaller resistor? Only down to the value the calculator gives at 20 mA. Smaller than that, and the LED gets hot and wears out fast.

Does it matter which side of the LED the resistor goes on? No. The current is the same everywhere around the loop, so the resistor works on either side.

My blue LED barely glows on 2 AA batteries. That’s expected: 2 AA batteries give 3 V, about the same as a blue LED needs, so there’s almost no push left over. Use 3 AA batteries.

What about two LEDs? Side by side (in parallel), give each LED its own resistor. One after the other (in series), they share one smaller resistor, because the two LEDs use up more of the battery’s push. Our Series vs. Parallel project builds both.

Try it for real in Light Up an LED, our second project.

Welcome! A grown-up first, please 👋

Teach Your Kid Electronics is written for adults to build with children. Electronics projects carry real risks, even with small batteries.

Please read our Safety Notice and Disclaimer and Terms of Use.