Skip to content

Practice problems

LED resistor practice problems

Every LED needs a resistor in series to set its current. Get the sum right and it glows at the brightness you planned. Get it wrong and it burns out. These ten problems size the resistor for one LED of each colour, round to a standard value, then handle strings of LEDs and the heat in the resistor.

The method

The LED takes its forward voltage, and the resistor takes whatever is left:

R = Vsupply − n × VLED over I

Here n is the number of LEDs in series: 1 for a single LED. These problems use the forward voltages LearnEE's simulator uses at 20 mA:

ColourForward voltage
Red2.0 V
Yellow2.1 V
Green2.2 V
Blue3.2 V
White3.2 V
  • Round up to the next standard value, so the current stays below your target. The E12 values are 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82, times 1, 10, 100 and so on.
  • Check the power: P = V × I for the resistor, kept to half its rating or less.

The problems

Type your answer and tap Check. Every one has the working, step by step.

  1. Problem 1 of 10

    A red LED (2.0 V) should run at 20 mA from a 12 V supply. What resistor goes in series with it?

    Show the working
    1. The resistor gets what the LED leaves: 12 − 2.0 = 10 V.
    2. R = 10 V over 0.02 A = 500 Ω. The next E12 value up is 560 Ω.

    Answer: 500 Ω

  2. Problem 2 of 10

    A green LED (2.2 V) should run at 5 mA from a 3.3 V supply. What resistor does it need?

    Show the working
    1. The resistor's voltage: 3.3 − 2.2 = 1.1 V.
    2. R = 1.1 V over 0.005 A = 220 Ω, which is a standard value already.

    Answer: 220 Ω

  3. Problem 3 of 10

    A yellow LED (2.1 V) should run at 15 mA from a 9 V battery. What resistor does it need?

    Show the working
    1. The resistor's voltage: 9 − 2.1 = 6.9 V.
    2. R = 6.9 V over 0.015 A = 460 Ω

    Answer: 460 Ω

  4. Problem 4 of 10

    A blue LED (3.2 V) should run at 20 mA from 5 V. What resistor does it need?

    Show the working
    1. Blue LEDs drop more, so the resistor gets less: 5 − 3.2 = 1.8 V.
    2. R = 1.8 V over 0.02 A = 90 Ω

    Answer: 90 Ω

  5. Problem 5 of 10

    A white LED (3.2 V) should run at no more than 20 mA from a 9 V battery. Which E12 resistor value should you fit?

    Show the working
    1. The exact value: R = 9 − 3.2 over 0.02 = 5.8 over 0.02 = 290 Ω.
    2. 290 Ω isn't an E12 value. Round up, so the current stays below 20 mA: the next value is 330 Ω.

    Answer: 330 Ω

  6. Problem 6 of 10

    A red LED (2.0 V) sits in series with a 470 Ω resistor on 9 V. What current flows?

    Show the working
    1. The resistor has 9 − 2.0 = 7 V across it.
    2. I = 7 V over 470 Ω ≈ 0.0149 A, which is 14.9 mA.

    Answer: 14.9 mA

  7. Problem 7 of 10

    Three red LEDs (2.0 V each) are in series on 12 V. What single resistor runs them at 20 mA?

    Show the working
    1. Take every LED's drop off the supply: 12 − 3 × 2.0 = 6 V.
    2. R = 6 V over 0.02 A = 300 Ω. The next E12 value up is 330 Ω.

    Answer: 300 Ω

  8. Problem 8 of 10

    Two white LEDs (3.2 V each) are in series on 9 V. What resistance runs them at exactly 15 mA?

    Show the working
    1. The resistor gets 9 − 2 × 3.2 = 2.6 V.
    2. R = 2.6 V over 0.015 A ≈ 173 Ω. Round up to 180 Ω, which gives about 14.4 mA.

    Answer: 173 Ω

  9. Problem 9 of 10

    A red LED (2.0 V) runs at 20 mA from 12 V through its resistor. How much power does the resistor give off as heat, in milliwatts?

    Show the working
    1. The resistor drops 12 − 2.0 = 10 V and carries 20 mA.
    2. P = V × I = 10 V × 0.02 A = 0.2 W, which is 200 mW. That's over half a 0.25 W resistor's rating, so use a 0.5 W one.

    Answer: 200 mW

  10. Problem 10 of 10

    A red (2.0 V), a green (2.2 V) and a blue (3.2 V) LED are in series on 12 V. You aim for 15 mA and round the resistor up to the next E12 value. What current actually flows?

    Show the working
    1. The LEDs drop 2.0 + 2.2 + 3.2 = 7.4 V, leaving 12 − 7.4 = 4.6 V for the resistor.
    2. For 15 mA: R = 4.6 V over 0.015 A ≈ 307 Ω, so fit the next E12 value up, 330 Ω.
    3. I = 4.6 V over 330 Ω ≈ 0.0139 A, which is 13.9 mA.

    Answer: 13.9 mA

Build it in a free lesson

“Ohm's law” is lesson 5 of 6 in Copper Flats, Electronics World 1. Free with an account. Lessons unlock in order, so you’ll do the 4 before it first.

Free lesson

Now build it yourself

Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.

Try it yourself: free lesson

“Ohm's law” is lesson 5 of 6 in Copper Flats, Electronics World 1. Free with an account. Lessons unlock in order, so you’ll do the 4 before it first.

Or start from the very first lesson, no account needed

Check it with a calculator

The ideas behind it

Questions people ask

How do I calculate the resistor for an LED?

Take the LED's forward voltage off the supply, then divide by the current you want: R = (V_supply − V_LED) ÷ I. A red LED (2.0 V) on 9 V at 20 mA needs (9 − 2.0) ÷ 0.02 = 350 Ω. Round up to the next standard value, 390 Ω.

What forward voltage should I use for each LED colour?

These problems, like the lessons' simulator, use 2.0 V for red, 2.1 V for yellow, 2.2 V for green, and 3.2 V for blue and white, at 20 mA. Real LEDs vary a little with the model and current, so check the datasheet for a real build.

Why round the resistor up, not down?

A bigger resistor means a smaller current. Rounding up keeps the current just below your target, so the LED never runs hotter than you planned. Rounding down would push it slightly over.

Can parallel LEDs share one resistor?

Not safely. The LED with the lowest forward voltage holds the shared point near its own drop and takes most of the current. Give each LED in parallel its own resistor, or wire them in series with one resistor.

More practice