Home ↓
CalculatorsVerified

Tech & Digital

LED Resistor Calculator (Series Resistor for LEDs)

Calculate the resistor you need to connect an LED safely to a power supply. A light-emitting diode has a nearly fixed forward voltage, typically about 2 volts for red and yellow LEDs and about 3 volts for blue and white ones, and its current rises very steeply if the voltage across it increases even slightly. Without something to limit the current, an LED connected directly to a battery or supply will overheat and fail. The simplest solution is a resistor in series, sized with Ohm’s law so that the voltage left over after the LED is dropped across the resistor at the desired current. Enter the supply voltage, the LED’s forward voltage and current from its datasheet and the number of LEDs in series, and the calculator gives the exact resistance, the next higher standard value from the E12 or E24 series, the actual current with that resistor, the power the resistor dissipates and a suggested power rating. For a red LED of 2 V at 20 mA on a 5 V supply, for example, the resistor is 150 Ω.

How to use this calculator

  1. Enter the supply voltage.
  2. Enter the LED forward voltage and current from the datasheet.
  3. Enter how many LEDs are connected in series.
  4. Choose the E12 or E24 series of standard resistors.
  5. Use the standard value and a resistor rated at least for the suggested wattage.

Choosing the current

Many small indicator LEDs are rated at 20 mA, but modern LEDs are often bright enough at 5 to 10 mA, which also extends their life and reduces power use. Always stay within the maximum current in the datasheet.

Higher-power LEDs used for lighting usually need a constant-current driver rather than a resistor, because the resistor would waste a lot of power and the current would vary with temperature and supply voltage.

Series or parallel

Putting several LEDs in series with one resistor uses the supply more efficiently, as long as their total forward voltage is comfortably below the supply voltage.

Avoid connecting LEDs in parallel with a single shared resistor: small differences in forward voltage mean one LED can take most of the current and fail. Give each parallel branch its own resistor.

Formula & method

Resistor R = (supply voltage − number of LEDs × forward voltage) ÷ currentChoose the next higher standard value, so the current is at or slightly below the targetActual current = (supply − LED voltages) ÷ chosen resistorResistor power = actual current² × R; choose a rating at least twice this

Exact resistance R = (Vsupply − N × Vf) ÷ I, where N is the number of LEDs in series, Vf the forward voltage of each and I the desired current in amperes. The calculator rounds up to the next value in the IEC 60063 E12 (1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2) or E24 series, so the current does not exceed the target. Actual current = (Vsupply − N × Vf) ÷ Rstandard. Resistor power P = I² × R; a rating of at least twice P is suggested. LED power = I × N × Vf, and efficiency = N × Vf ÷ Vsupply. If N × Vf is equal to or greater than the supply voltage, the LEDs will not light properly and a higher supply or fewer LEDs in series is needed. LEDs in parallel should each have their own resistor.

Worked example

Three white LEDs (3.2 V, 20 mA) on 12 V

  1. Voltage left for the resistor: 12 − 3 × 3.2 = 2.4 V.
  2. R = 2.4 ÷ 0.020 = 120 Ω, which is a standard E12 value.
  3. Power = 0.02² × 120 = 0.048 W; a 1/8 W or 1/4 W resistor is fine.

Answer: Use a 120 Ω resistor in series with the three LEDs.

Frequently asked questions

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

About 150 Ω for a 2 V LED at 20 mA.

What resistor for a white LED on 5 V?

About (5 − 3.2) ÷ 0.02 = 90 Ω, so use 100 Ω.

Why must I round up?

A higher resistance keeps the current at or below the target.

What wattage resistor do I need?

At least twice the calculated power; often 1/4 W is enough for small LEDs.

Can I use one resistor for parallel LEDs?

It is not recommended; give each LED its own resistor.

Where do I find the forward voltage?

In the LED datasheet; typical values are about 2 V for red and 3 V for blue or white.