Calculateus

LED Series Resistor Calculator

Calculate the correct series resistor value to safely power an LED from a given supply voltage.

Result

Required Resistor Value
345 Ω
Resistor Power Rating Needed
0.138 W (use 1/4W+ resistor)

About the LED Resistor Calculator

The LED Series Resistor Calculator works out the resistor value needed to safely run an LED from a given power supply without burning it out. Because LEDs have very little internal resistance, connecting one directly to a battery or supply above its forward voltage lets current climb unchecked, which is why every LED circuit needs current-limiting resistance in series with it. This tool takes the supply voltage, the LED's forward voltage, and the target current, and returns the resistor value plus the power rating that resistor needs to handle.

How It Works

You enter the supply voltage, the LED's forward voltage (the drop across the LED itself, typically 1.8-2.2 V for red LEDs and up to 3.0-3.4 V for blue or white ones), and the desired forward current in milliamps. The calculator subtracts the LED's forward voltage from the supply voltage to find the voltage the resistor must absorb, converts your current to amps, and divides voltage by current to get resistance in ohms. It also multiplies that voltage drop by the current to report the power the resistor will dissipate, flagging whether a 1/4 W or 1/2 W resistor is needed.

Resistance = (Supply Voltage - LED Forward Voltage) / LED Current (in amps); Power = (Supply Voltage - LED Forward Voltage) x LED Current.

Formula & Methodology

Working it by hand: convert the current from mA to A by dividing by 1000, subtract the LED's forward voltage from the supply voltage to get the voltage the resistor needs to drop, then divide that voltage drop by the current in amps using Ohm's law (R = V/I) to get resistance in ohms. For the power rating, multiply the same voltage drop by the current in amps (P = VI); the calculator recommends a 1/2 W or larger resistor whenever that dissipated power exceeds 0.2 W, and a 1/4 W resistor is treated as sufficient below that threshold.

Examples

A red LED on a 9V battery

With a 9V supply, a red LED with a 2.1V forward voltage, and a target current of 20 mA, the voltage drop across the resistor is 9 - 2.1 = 6.9V. Dividing by 0.02A gives a required resistance of 345 ohm, dissipating 6.9 x 0.02 = 0.138 W, so a 1/4W resistor is sufficient.

A blue LED on a 5V USB line

A 5V supply feeding a blue LED with a 3.2V forward voltage at 15 mA leaves a 1.8V drop across the resistor, giving 1.8 / 0.015 = 120 ohm and a power dissipation of 0.027 W, comfortably within a 1/4W resistor's rating.

Advantages

  • Prevents the single most common cause of LED failure: connecting an LED directly to a supply with no current-limiting resistor.
  • Also reports the resistor's power dissipation, so you pick a resistor rated to survive continuous use rather than one that overheats.
  • Works for any supply voltage and any LED color once you know its typical forward voltage, covering the full range from coin-cell projects to bench power supplies.

Common Mistakes

  • Using the supply voltage alone in Ohm's law instead of subtracting the LED's forward voltage first, which produces a resistance value far too high and an underpowered LED.
  • Guessing a forward voltage that does not match the actual LED color, since blue and white LEDs need a noticeably higher forward voltage than red or yellow ones.
  • Choosing a resistor by resistance value alone and ignoring the power rating, which can lead to a resistor that overheats and fails, or degrades quietly over time.

Edge Cases to Watch For

  • If the supply voltage is less than or equal to the LED's forward voltage, there is no voltage left for the resistor to drop and the calculator returns an error, since the LED would not light reliably under those conditions.
  • A current value of zero or less is rejected, since dividing by zero current is undefined and a real LED needs some forward current to emit light.
  • The result is the nearest theoretical resistance; in practice you round up to the closest standard resistor value since exact calculated values like 347 ohm resistors are not manufactured.

Common Use Cases

  • Hobbyist electronics builders wiring LEDs into breadboard or perfboard projects.
  • Students learning Ohm's law and current-limiting through a hands-on, practical application.
  • Makers repairing or modifying existing LED circuits, such as replacing a burned-out LED with a different color that needs a different resistor value.
Written & fact-checked by the Calculateus TeamLast updated August 5, 2026How we verify our formulas

Frequently asked questions

Why does an LED need a resistor at all?

LEDs don't have significant internal resistance to limit current on their own - connected directly to a voltage source higher than their forward voltage, they'll draw excessive current and burn out almost instantly. The series resistor drops the excess voltage (supply minus LED forward voltage) and limits current to a safe level.

Conclusion

The LED Series Resistor Calculator turns a basic but essential Ohm's law calculation into a quick lookup, sparing you from either guessing a resistor value or losing an LED to excess current. Getting both the resistance and the power rating right the first time means one less component to replace.