Skip to content
K Knidox Search…
Electronics · Circuits

LED Resistor Calculator

Find the current-limiting resistor for an LED — plus its nearest E12 size and power rating.

V
Source feeding the LED.
V
From the LED datasheet.
mA
Desired forward current.
Try a setup
Series resistor (R)
150Ω

Nearest E12 value: 150 Ω · resistor power: 0.06 W. Pick a resistor rated above the dissipated power (e.g. a ¼ W part for 0.06 W).

The series resistor for an LED is R = (Vsupply − Vled) ÷ Iled. Driving a 2.0 V red LED at 20 mA from a 5 V supply needs R = (5 − 2.0) ÷ 0.02 = 150 Ω, which is already a standard E12 value. The resistor dissipates P = 3 × 0.02 = 0.06 W.

Why an LED needs a series resistor

An LED is a diode, not a resistor: past its forward voltage the current rises almost vertically, so connecting it straight across a supply lets the current run away and destroys it. A series resistor absorbs the leftover voltage — the difference between your supply and the LED’s forward drop — and pins the current to a safe value. The same idea, splitting a voltage across resistors, drives the voltage divider and follows straight from Ohm’s law.

R = (Vsupply − Vled) ÷ Iled

Vsupply = supply voltage (V), Vled = LED forward voltage (V), Iled = LED current (A). Enter current in mA; the tool divides by 1000.

Worked example

Drive a red LED (forward voltage 2.0 V) at 20 mA from a 5 V supply:

  1. 1
    Find the voltage across the resistor. Subtract the LED forward voltage from the supply: 5 V − 2.0 V = 3.0 V.
  2. 2
    Convert the current to amps. Divide milliamps by 1000: 20 mA ÷ 1000 = 0.02 A.
  3. 3
    Divide to get the resistance. R = 3.0 V ÷ 0.02 A = 150 Ω.
  4. 4
    Round up to a standard value. 150 Ω is already an E12 value; otherwise pick the next standard size up.
  5. 5
    Check the power rating. P = 3.0 V × 0.02 A = 0.06 W — well within a common ¼ W resistor.

Typical LED forward voltages by colour

Approximate ranges — always confirm against your LED’s datasheet, as they vary by chemistry and current.

LED colourTypical forward voltage
Red≈ 1.8–2.2 V
Yellow≈ 2.1 V
Green≈ 2.2 V
Blue / white≈ 3.0–3.4 V

Rounding and power rating

Round up, not down. The exact figure rarely lands on a stocked value, so pick the next standard size up. A larger resistor means slightly less current — a dimmer but safer LED. Rounding down pushes more current through and can shorten the LED’s life.

Check the wattage. The resistor turns the leftover voltage into heat: P = (Vsupply − Vled) × Iled. Most through-hole resistors are rated ¼ W (0.25 W). At higher supply voltages or currents the dissipation climbs, so choose a resistor comfortably above the calculated power.

What forward voltage should I use?
Use the value from your LED’s datasheet at the current you plan to run. As a rough guide, red is ≈ 1.8–2.2 V, yellow ≈ 2.1 V, green ≈ 2.2 V, and blue or white ≈ 3.0–3.4 V.
Why round the resistor up rather than down?
A bigger resistor lets slightly less current through, so the LED runs a touch dimmer but safely within limits. Rounding down raises the current above your target and can overheat and shorten the life of the LED.
What LED current should I pick?
Around 20 mA is a safe, bright default for standard 5 mm LEDs, but many are happy at 5–15 mA. Lower current means a dimmer LED and less heat in the resistor. Never exceed the datasheet’s maximum.
What power rating does the resistor need?
Compute P = (Vsupply − Vled) × Iled. In the 5 V, 2.0 V, 20 mA example that is 0.06 W, easily handled by a ¼ W (0.25 W) resistor. Higher supply voltages or currents may need ½ W or more.
What is the E12 series?
E12 is a standard set of resistor values spaced so each is about 20% above the last: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 — repeated across every decade (×10ⁿ). The tool snaps your result to the nearest one.
Can I use one resistor for several LEDs?
Only if the LEDs are wired in series, and only when their total forward voltage stays below the supply. LEDs in parallel should each get their own resistor, because tiny voltage differences make one hog the current.