b2KIT

LED Resistor Calculator

Calculate the correct resistor value for LEDs based on supply voltage, forward voltage, and current.

Tested tool guide Tested browser tools Checked August 16, 2026

What LED Resistor Calculator does, with a checked example

Choosing an LED's series resistor starts with the voltage that must be dropped outside the LED. This calculator subtracts the LED forward voltage from the supply voltage, then divides that remainder by the desired LED current to give resistance in ohms. It addresses the simple current-limiting resistor calculation, not active current regulation. The frequent mistake is treating milliamperes as amperes: 20 mA is 0.020 A, not 20 A. Another common surprise is that the exact result may not be a stocked resistor value.

Worked example

A concrete input and expected output from the current implementation.

Input

Supply voltage: 9 V
LED forward voltage: 2 V
Desired current: 20 mA

Expected output

Required series resistance: 350 ohms

The resistor must drop 9 V - 2 V = 7 V. Converting 20 mA to 0.020 A gives R = 7 V / 0.020 A = 350 ohms; checking backward, 7 V / 350 ohms = 0.020 A.

How the result is produced

1

Resistance calculation

For one LED in series with one resistor, the calculation is R = (supply voltage - LED forward voltage) / LED current. Current must be expressed in amperes for the result to be in ohms. The calculation is meaningful only when the supply voltage is greater than the forward voltage and the requested current is positive.

2

Selecting a physical resistor

If the calculated resistance is unavailable, selecting the next higher standard value reduces the current relative to the target; selecting a lower value increases it. Recalculate current as I = (supply voltage - forward voltage) / R. Also check resistor dissipation using P = I squared times R and choose a suitable power rating with reasonable margin.

Good uses

  • Choosing the series resistor for a single indicator LED powered from a known DC supply, using forward voltage and target current from the LED's data sheet.
  • Recalculating an LED resistor when moving a breadboard circuit from one supply voltage to another while keeping approximately the same desired current.
  • Comparing resistor requirements for LEDs with different forward voltages, such as replacing a red indicator with a blue one in the same basic circuit.

Limits and checks

  • Forward voltage is not a universal value for an LED color. It varies by device, current, temperature, and manufacturing variation, so use an appropriate data-sheet value rather than a remembered color estimate.
  • The calculated resistance establishes only a nominal current. Supply variation, resistor tolerance, and the LED's actual forward voltage can move the real current above or below the entered target.
  • An exact resistance result may not correspond to a commonly stocked value. The result also does not by itself confirm that the resistor's power rating or the LED's current rating is adequate.

Common questions

Should I buy the exact resistance shown?

Not necessarily. If the exact value is unavailable, a nearby standard resistor can be used after recalculating the resulting current. The next higher resistance is generally the conservative choice because it lowers current. Do not choose solely by resistance: verify the resistor's expected power dissipation and ensure the revised current remains suitable for the LED.

Can this calculation be used for several LEDs?

Yes, for LEDs connected in series, provided their forward voltages are added and the supply exceeds that total; the same current then passes through every LED. No, a single result should not be treated as a reliable design for LEDs connected directly in parallel. Current may divide unevenly because individual forward voltages differ, so separate branch resistors are commonly required.

References and verification

The example and behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools