Head office, Rana Pratap Bagh, Delhi011 2721 1512+91 97116 99511

Electronics and projects

LED resistor calculator

An LED must never go straight onto a battery: it needs a resistor in series to limit the current. Enter the supply, the LED and the current you want to get the exact resistor, the standard value to buy and the power it handles.

  • Made forClass 6 to 12, makers, Arduino users
  • Shows the workingEvery step, ready for your practical file
  • Instant answersResults change as you type

Resistor for an LED

Choose the LED colour (or type the forward voltage from its datasheet), the supply voltage and the current you want.

A 9 V battery, 5 V from an Arduino, 3.7 V from a Li-ion cell, 12 V adapter… Unit: V.

Leave empty to use the typical value for the colour. Unit: V.

Many small LEDs are rated about 20 mA; 10 to 15 mA is usually bright enough. Unit: mA.

Reset

Result

Next E12 resistor above the exact value180 ΩExact value 150 Ω; with 180 Ω the LED gets 16.7 mA
180 Ω+5 VLED current ≈ 16.7 mA
Exact resistor
150 Ωfor 20 mA
Standard E12 to use
180 Ω16.7 mA
Power in the resistor
50 mWbuy ¼ W (0.25 W)
Power in each LED
33.3 mW

Working

  1. Voltage across the resistor = supply − LED voltage = 5 V − 2 V = 3 V.
  2. R = V ÷ I = 3 V ÷ 0.02 A = 150 Ω.
  3. Next E12 value above 150 Ω is 180 Ω, which gives I = 3 V ÷ 180 Ω = 16.67 mA.
  4. Resistor power P = V × I = 3 V × 0.01667 A = 50 mW.
  5. Forward voltage used: 2 V, the typical value for red (range 1.8 to 2.2 V).
  • Good to know: 150 Ω is itself a standard E12 value: it gives exactly 20 mA, which is fine if that is within your LED's rating. The next value up, 180 Ω, gives a little margin.
  • Tip: Measure the real current by putting a multimeter (on the mA range) in series with the LED.

What it works out

Understanding LED resistors

An LED drops a nearly fixed voltage, its forward voltage, and lets through as much current as the rest of the circuit allows. Without something to limit the current it overheats and fails, sometimes with a pop.

A resistor in series takes the rest of the supply voltage. Choosing it is Ohm's law on the voltage that is left over, then moving up to the next value you can actually buy, so the current stays a little below your target.

Formula and worked example

Working out LED resistors by hand

The calculator uses exactly these formulas. Write them in your notebook and check one answer by hand: it is the surest way to remember them.

The formula

  • R = (Vsupply − n × VF) ÷ I
  • Resistor power P = (Vsupply − n × VF) × I
  • LED current with the standard value = (Vsupply − n × VF) ÷ RE12
VF
forward voltage of one LED, from its datasheet
n
number of LEDs in series in one string
I
LED current in amperes (20 mA = 0.020 A)
RE12
the next standard E12 value above the exact R

Worked example

A red LED on a 5 V supply at 20 mA

  1. Voltage left for the resistor: 5 V − 2 V = 3 V.
  2. R = 3 V ÷ 0.020 A = 150 Ω.
  3. 150 Ω is itself an E12 value. The next E12 value above it, 180 Ω, gives 3 ÷ 180 = 16.7 mA: a little margin, still bright.
  4. Resistor power: 3 V × 0.0167 A = 0.05 W, so an ordinary ¼ W resistor is plenty.

Answer150 Ω exact; 180 Ω standard (16.7 mA); ¼ W

Typical forward voltage of small 3 mm and 5 mm LEDs (check your LED's datasheet)

LED colourTypical rangeUsed here
Red1.8 to 2.2 V2.0 V
Orange1.9 to 2.2 V2.1 V
Yellow1.9 to 2.4 V2.1 V
Green (yellow-green type)1.9 to 2.4 V2.2 V
Green (bright pure-green type)2.8 to 3.6 V3.2 V
Blue2.8 to 3.6 V3.2 V
White2.8 to 3.6 V3.2 V

In projects and exams

How students use it

Supply, LED colour and current in; the exact resistor, the next E12 value and its power out. Here is where it earns its place in a school year.

  • Lights in working models

    Traffic signals, lighthouses, model houses and indicator lamps in exhibition models all need one resistor per LED or per string.

  • Arduino and microcontroller pins

    A resistor keeps the LED current within what both the LED and the board's pin can take. Check the board's documentation for its pin limit.

  • Battery-powered projects

    A higher resistor and a lower current make a battery last longer, and the LED is often still bright enough.

  • Strings of LEDs

    Put LEDs in series to share one resistor on a higher supply, or give each parallel LED its own resistor.

Check your work

Common mistakes to avoid

These are the slips that cost marks in exams and burn out parts on the bench.

  1. No resistor at all

    The LED may light for a moment and then fail. Even a coin cell project is safer with a calculated resistor.

  2. One resistor for several parallel LEDs

    LEDs are never exactly alike, so one hogs the current and burns out, then the next. Use one resistor for each LED in parallel.

  3. LED the wrong way round

    The longer leg is the anode (+) and the cathode (−) is beside the flat edge of the rim. Backwards, it simply stays dark.

  4. Ignoring the resistor's wattage

    On 12 V or more, the resistor may need more than ¼ W. The calculator shows the power and the rating to buy.

Questions

Questions about LED resistors

Stuck on a project or a sum? Ask the institute on WhatsApp.

Ask on WhatsApp
Which leg of an LED is positive?

The longer leg is the anode, which goes towards the positive supply. The shorter leg, next to the flat side of the LED's rim, is the cathode and goes towards negative.

Can I use a bigger resistor than the calculated value?

Yes. A bigger resistor means less current: the LED is a little dimmer, runs cooler and lasts longer, and the battery lasts longer too. A smaller resistor than calculated pushes the LED beyond your chosen current.

What does E12 mean?

It is the standard series of 12 resistor values in each decade: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82, and the same numbers times 10, 100, 1,000 and so on. Kits and shops stock these values.

Why does the calculator ask for the forward voltage?

It differs by colour and by make. Red LEDs are around 2 V and blue or white around 3 V, but the datasheet gives the exact figure. The calculator uses a typical value when you leave the box empty.

My LED is dim with a 9 V battery. Why?

Check the resistor value first (a 3.3 kΩ in place of 330 Ω is a common slip), then the battery: a used 9 V battery can drop a lot under load. Measure the current with a multimeter in series.

WhatsApp us