ElectroHub

LED Resistor Calculator

An LED does not obey Ohm's law, so it cannot set its own current: connect one straight across a supply and it draws whatever the circuit allows until it fails. The series resistor takes the leftover voltage and fixes the current.

LED Series Resistor — R = (Vₛ − V𝒻) / I𝒻

Pick the right current-limiting resistor for an LED from a known supply voltage.

Resistor
Power dissipated
Nearest E12 value
  1. 1.Given: Vₛ = 5 V, V𝒻 = 2 V, I𝒻 = 20 mA = 0.02 A
  2. 2.FormulaV_R = Vₛ − V𝒻 (voltage the resistor must drop)SubstituteV_R = 5 − 2ResultV_R = 3 V
  3. 3.FormulaR = (Vₛ − V𝒻) ÷ I𝒻SubstituteR = 3 V ÷ 0.02 AResultR = 150 Ω
  4. 4.FormulaP = (Vₛ − V𝒻) × I𝒻SubstituteP = 3 × 0.02ResultP = 60 mW

Tip: pick a resistor with a power rating at least 2× the dissipated power.

Common trap: LEDs are current-driven, not voltage-driven. Never connect one straight across a supply "because the voltages match" — without the resistor, current runs away with temperature and the LED dies.

The formula

R = (V_supply − V_forward) / I_forward

V_supply
supply rail voltage (volts)
V_forward
LED forward voltage drop, typically 1.8–3.4 V by colour
I_forward
desired LED current (amperes; usually 5–20 mA)
R
series resistor (ohms)

Worked example

A red LED (V_f = 2 V) at 20 mA on a 5 V supply.

  1. Voltage left for the resistor: 5 − 2 = 3 V
  2. R = 3 / 0.02 = 150 Ω
  3. Resistor power: P = 3 × 0.02 = 0.06 W — any ⅛ W part is fine

150 Ω, which is itself a standard E12 value.

Where you'll use it

The first circuit anyone builds, and still the one most often got wrong. The calculator refuses supply voltages at or below the forward voltage, because no resistor can fix that — you need a boost converter or fewer LEDs in series.

The laws behind it

Parts this applies to

Related calculators