CALCULATOR · ELECTRONICS

LED Resistor Calculator

Calculate the series resistor needed to limit the current through an LED.

Result—
Open in Engineering Lab ↗

The result and the visualization update as you change the values.

LIVE VISUALIZATION

What does this calculator do?

An LED needs its current limited. A series resistor takes up the difference between the supply and the LED’s forward voltage, so the current cannot rise until it destroys the LED.

MAIN FORMULA

R = (Vs − Vf) / I

Subtract the LED’s forward voltage Vf from the supply voltage Vs and divide by the desired current in amps. Then check the power the resistor will dissipate.

Worked example

With Vs = 5 V, Vf = 2 V and I = 10 mA, R = 300 Ω. In practice you pick a nearby standard value such as 330 Ω.

Practical tips

  • Vf changes with colour, current and temperature.
  • Never use a zero or negative resistance: it means the supply has no headroom.
  • Work out the resistor’s power with P = I²R.

Common mistake to avoid

Don’t rely on a single nominal LED voltage: Vf depends on colour, current and temperature. Leave a power margin on the resistor.

Complete LED resistor formulas

The series resistor drops the excess voltage between the supply and the LED and, by Ohm’s law, sets the current:

  • Resistance: R = (Vs − Vf) / If (I in amps: 10 mA = 0.01 A)
  • Several LEDs in series: R = (Vs − n · Vf) / If
  • Actual current with the standard value: I = (Vs − Vf) / Rstandard
  • Resistor power: PR = (Vs − Vf) · I = I² · R
  • LED power: PLED = Vf · I

If there is no exact standard value, take the next one up: the current ends up slightly below the target, which is the safe side.

Typical values

ColourTypical VfR at 5 V, 10 mAStandard (E12)R at 12 V, 20 mAStandard (E12)
Red≈ 2.0 V300 Ω330 Ω500 Ω560 Ω
Yellow≈ 2.1 V290 Ω330 Ω495 Ω560 Ω
Green (InGaN)≈ 3.0 V200 Ω220 Ω450 Ω470 Ω
Blue≈ 3.2 V180 Ω180 Ω440 Ω470 Ω
White≈ 3.2 V180 Ω180 Ω440 Ω470 Ω

Forward voltages are indicative and vary with manufacturer, current and temperature (older GaP green LEDs are around 2.1 V). Always check your LED’s datasheet.

Worked examples

Red LED on a 9 V battery at 15 mA. R = (9 − 2) / 0.015 ≈ 466.7 Ω → use 470 Ω. Actual current: 7 / 470 ≈ 14.9 mA. Resistor power: 7 × 0.0149 ≈ 0.104 W, so a 1/4 W resistor runs at 42 % of its rating.

Three white LEDs in series at 12 V and 20 mA. R = (12 − 3 × 3.2) / 0.02 = 2.4 / 0.02 = 120 Ω, an E12 value. Power: 2.4 × 0.02 = 48 mW. Note that the resistor only drops 2.4 V here, so a small difference in Vf changes the current noticeably. If each LED had 3.3 V, the current would fall to (12 − 9.9) / 120 ≈ 17.5 mA.

Common mistakes

  • Connecting the LED without a resistor: the current is limited only by the supply’s internal resistance and the LED fails within seconds.
  • One resistor for several LEDs in parallel: the LED with the lowest Vf takes almost all the current. Use one resistor per LED or wire them in series.
  • Designing at the absolute maximum current: if the datasheet gives 20 mA as typical, running at 30 mA shortens the LED’s life. Many indicator LEDs are bright enough at 2–10 mA.
  • Forgetting milliamps: 10 mA is 0.01 A; dividing by 10 gives a result 1000 times too small.
  • Not checking resistor power: at 24 V or more and 20 mA, dissipation easily exceeds 0.4 W.

Frequently asked questions

What resistor should I use for an LED on 5 V?

For a red LED at 10 mA, about 330 Ω; for blue or white, about 180 Ω. For less brightness, increase the value: 1 kΩ is usually enough for an indicator.

What resistor should I use for an LED on 12 V?

At 20 mA, about 560 Ω for red and 470 Ω for white. Check the power: (12 − 2) × 0.018 ≈ 0.18 W, within 1/4 W but with little margin; a 1/2 W part is more comfortable.

How do I read the value of the resistor I bought?

Use the resistor color code calculator: for example, 330 Ω is orange, orange, brown.

To learn the physics of the LED, why lowering the voltage is not enough and other ways to limit current, read the LED resistor guide.

Educational tool. Check tolerances, datasheets, standards and real operating conditions before using the results in critical applications.