PartAndStock
Blog

How to Calculate an LED Resistor: Formula and Examples

August 29, 2026 6 min read
Quick answer

An LED resistor is a resistor placed in series with an LED to limit its current to a safe level. Its value is R = (supply voltage − LED forward voltage) / LED current. For example, with 5 V, a 2 V red LED and 20 mA: (5 − 2) / 0.02 = 150 Ω. Without a resistor the LED burns out from excess current.

An LED resistor (also called a current-limiting resistor) is a resistor placed in series with an LED to limit the current flowing through it to a safe level. LEDs are current-driven devices; they do not limit their own current. An LED connected directly to a voltage source draws excessive current and burns out within seconds. A series resistor keeps that current under control and protects the LED.

Why does an LED need a series resistor?

An LED's current–voltage (I–V) curve is exponential: a tiny increase in the forward voltage (VF) multiplies the current. For example, an LED that draws 10 mA at 2.0 V may draw 30 mA at 2.1 V. That is why driving an LED directly from a voltage source is dangerous — a small change in voltage or temperature sends the current soaring and the LED overheats and fails. The fix is a series resistor that makes the current largely independent of voltage.

LED resistor formula: R = (Vsupply − VF) / I

The resistor value is the voltage across the resistor divided by the LED current. The voltage across the resistor is the supply voltage minus the LED's forward voltage:

R = (Vsupply − VF) / ILED

SymbolMeaningUnit
VsupplySupply voltageVolts (V)
VFLED forward voltage (depends on color)Volts (V)
ILEDDesired LED currentAmperes (A)
RSeries resistor valueOhms (Ω)

This is a direct application of Ohm's law (R = V / I). A typical LED current for small indicators is 10–20 mA.

Typical forward voltage (VF) by color

VF depends on the LED's color (and therefore its semiconductor material). Check the datasheet for the exact value; approximate ranges are:

LED colorTypical VF
Red1.8 – 2.2 V
Yellow / Orange2.0 – 2.2 V
Green2.0 – 3.0 V
Blue / White3.0 – 3.4 V

How to calculate it, step by step

  1. Determine the supply voltage (e.g. 5 V).
  2. Get the LED's forward voltage (VF) from the datasheet or the color table.
  3. Choose the desired LED current (usually 10–20 mA).
  4. Apply the formula: R = (Vsupply − VF) / I.
  5. Pick the nearest higher standard resistor value (lowering the current slightly is safe).
  6. Calculate the power the resistor dissipates and buy a resistor with a suitable wattage.

Worked examples

  • 5 V, red LED (2 V), 20 mA: R = (5 − 2) / 0.02 = 150 Ω. Nearest standard value 150 Ω.
  • 12 V, blue LED (3.2 V), 20 mA: R = (12 − 3.2) / 0.02 = 440 Ω → nearest standard 470 Ω.
  • 9 V, three red LEDs in series (3 × 2 = 6 V), 15 mA: R = (9 − 6) / 0.015 = 200 Ω.

The resistor's power (watt) rating

A resistor dissipates power and heats up. The dissipated power is P = I² × R (or VR × I). For example, at 150 Ω and 20 mA: P = 0.02² × 150 = 0.06 W = 60 mW. A 1/4 W (0.25 W) resistor is more than enough. With high-current LEDs this value grows — always pick a resistor rated for at least twice the calculated power. More detail: how to choose a resistor's power rating.

Common mistakes

  • Leaving out the resistor entirely: connected directly to voltage, the LED burns out from excess current.
  • Wrong VF: assuming a blue/white LED is 2 V badly skews the current.
  • Supply < VF: if the source voltage is below the LED's forward voltage, the LED will not light at all (e.g. driving a single blue LED from 3 V).
  • Parallel LEDs on one resistor: the current does not split equally; give each LED its own resistor.
  • Forgetting the power rating: an under-rated resistor overheats at high current.

When do you NOT need a resistor?

A series resistor is simple and cheap, but it drives the LED inefficiently (excess energy becomes heat in the resistor) and the current changes when the supply voltage changes. For high-power LEDs and professional lighting, a constant-current LED driver is used instead: it holds the current constant regardless of supply voltage. Still, for most 5 mm indicator LEDs and simple circuits, a series resistor is the most practical solution.

Use the calculator

To instantly find the resistor value, the nearest standard value and the required power rating from the color, supply voltage and current, use our LED Resistor Calculator.

Frequently Asked Questions

What is the formula to calculate an LED resistor?+
R = (supply voltage − LED forward voltage) / LED current. For example, with a 5 V supply, a 2 V red LED and 20 mA: (5 − 2) / 0.02 = 150 Ω.
Why do you need a resistor with an LED?+
An LED is current-driven and does not limit its own current. Connected straight to a voltage it draws excess current and burns out. A series resistor keeps the current at a safe level.
Can you connect an LED without a resistor?+
Only with a constant-current driver or special modules whose voltage exactly matches the LED's forward voltage. In simple circuits, connecting an LED without a resistor destroys it.
What forward voltage (VF) should I use for each LED color?+
Approximately: red 1.8–2.2 V; yellow/orange 2.0–2.2 V; green 2.0–3.0 V; blue/white 3.0–3.4 V. Use the datasheet for the exact value.
What power rating should an LED resistor have?+
The dissipated power is P = I² × R. For most indicator LEDs this is around 60 mW, so a 1/4 W resistor is enough. Always pick at least twice the calculated power.