Skip to content
InnovaLabWorks
On the App StoreIn developmentGuidesNewsAbout usContactAppsPrivacyTerms of Service
English (US)
English (US)EspañolPortuguês (BR)Français (CA)Deutsch
Home › Guides › How to calculate the resistor value for an LED: the formula, standard values and power rating

How to calculate the resistor value for an LED: the formula, standard values and power rating

Updated November 29, 2026 · InnovaLabWorks

An LED needs something to limit its current. Connect one straight to a battery or a 5 V supply and it can burn out in moments, because a small rise in voltage causes a large rise in current. For simple low-voltage circuits, the usual answer is one resistor in series with the LED.

Here is the formula, three worked examples, how to choose a standard resistor value and wattage, and the color bands for the values you are likely to use. Everything here is for low-voltage DC hobby circuits such as batteries, USB and bench supplies.

The formula

The resistor has to drop whatever voltage the LED does not use. By Ohm’s law, R = V ÷ I, so:

  • R = (supply voltage − LED forward voltage) ÷ LED current.
  • Use volts and amps: 20 mA is 0.020 A.
  • Power in the resistor: P = (supply voltage − forward voltage) × current.

Take the forward voltage and the current from the LED’s datasheet. As a rough guide, red LEDs are often around 1.8 to 2.2 V and blue or white LEDs around 3.0 to 3.4 V, and many small indicator LEDs have a typical rated current of about 20 mA (check the absolute maximum on the datasheet). Many LEDs are bright enough at much less current, which also runs them cooler.

Example 1: a red LED on 5 V

Supply 5 V, forward voltage 2.0 V, current 20 mA. R = (5 − 2.0) ÷ 0.020 = 3 ÷ 0.020 = 150 Ω. Power = 3 × 0.020 = 0.06 W, or 60 mW. A common 1/4 W resistor has plenty of margin, and 150 Ω is itself a standard value, so you can use it as calculated.

Example 2: a white LED on a 9 V battery

Supply 9 V, forward voltage 3.2 V, target 15 mA. R = (9 − 3.2) ÷ 0.015 = 5.8 ÷ 0.015 = 387 Ω. That is not a standard value, so round up to 390 Ω. The actual current is 5.8 ÷ 390 = 0.0149 A, about 14.9 mA. Power = 5.8 × 0.0149 = 0.086 W, so a 1/4 W resistor is fine.

Always round up to the next standard value, not down. A smaller resistor lets more current through than you planned.

Example 3: two LEDs in series on 12 V

LEDs in series share one current, so add their forward voltages. Two red LEDs at 2.0 V each make 4.0 V. R = (12 − 4.0) ÷ 0.020 = 400 Ω. Round up to 470 Ω, a common standard value, for an actual current of 8 ÷ 470 = 17 mA. Power = 8 × 0.017 = 0.136 W. That is under 1/4 W, but more than half of it, so by the twice-the-power rule below, a 1/2 W part is the safer choice.

Do not put several LEDs in parallel on one shared resistor. Their forward voltages differ slightly, so one LED can take most of the current. Give each parallel LED, or each series string, its own resistor.

Pick a standard value and wattage

Resistors come in standard series. The common E12 series repeats these values in every decade: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82, so you will find 150, 390 and 470 Ω but not 387 or 400. For wattage, a common rule is to choose a part rated for at least twice the power you calculated, so it does not run hot.

  • 150 Ω: brown, green, brown, then the tolerance band.
  • 390 Ω: orange, white, brown, then the tolerance band.
  • 470 Ω: yellow, violet, brown, then the tolerance band.
  • On a four-band resistor, a gold tolerance band means ±5%.

Safety first: low voltage only

These calculations are for low-voltage DC circuits. Never connect a hobby LED circuit to household mains, and do not open or modify mains-powered devices unless you are qualified to do so. LED lighting that runs from mains uses dedicated drivers, and any mains wiring should be done by a qualified electrician in line with your local electrical code. Even on low voltage, check part ratings, watch for hot components and disconnect power before changing the circuit.

Where OhmsLab helps

OhmsLab: Ohms Law & Codes

OhmsLab is an iPhone app for this kind of bench work. Its LED series resistor tool works from the supply voltage, forward voltage and current, and gives the nearest standard value and a power rating. It also solves Ohm’s law and power from any two of voltage, current, resistance or power, decodes 4, 5 and 6 band resistor color codes with tolerance and temperature coefficient, finds the bands for a value you enter, combines resistors in series and parallel, and calculates voltage dividers. You can save any calculation to your bench and reopen it live. Everything stays on your iPhone, with no account.

The free version includes the Ohm’s law and power solver and the full resistor color decoder, with unlimited saved calculations. A one-time Lifetime unlock adds the LED resistor, voltage divider and series and parallel tools, plus PDF and CSV bench sheet export. OhmsLab is a planning aid for hobby and bench work, so check part datasheets and ratings before you build.

View on the App Store · App details and screenshots

Questions and answers

What resistor do I need for an LED on 5 volts?

Use R = (5 − forward voltage) ÷ current. For a red LED at 2.0 V and 20 mA, that is 3 ÷ 0.020 = 150 Ω, which is a standard value. Check the forward voltage and current on your LED’s datasheet.

Should I round an LED resistor up or down?

Round up to the next standard value. A larger resistor gives slightly less current, while rounding down lets more current through the LED than you planned.

Can several LEDs share one resistor?

LEDs in series can share one resistor, with their forward voltages added together. LEDs in parallel should each have their own resistor, because small differences in forward voltage can let one LED take most of the current.

Can I use these calculations to wire an LED to household power?

No. These calculations are for low-voltage DC circuits only. Mains-powered LED lighting needs a dedicated driver, and mains wiring should be done by a qualified electrician following your local electrical code.

This guide is general information for low-voltage hobby circuits. Always check component datasheets and ratings. Do not work on mains wiring yourself; use a qualified electrician and follow local electrical codes.

Lire en français · All guides

InnovaLabWorks
StudioAbout usGuidesNewsContact & feature requestsAll InnovaLabWorks apps
LegalPrivacyTerms of Service
© 2026 InnovaLabWorks. All rights reserved.Cookie notice