// led_resistor_calc.md

LED resistor calculator.

Compute the current-limiting resistor for any LED. Pick standard E12 or E24 value. Get wattage recommendation. Parts on Manila shelf.

// input.md
// result.md
resistor 100 Ω exact: 100 Ω
power 0.04 W use ≥ 1/8 W
math R = (5 − 3.0) / 0.020 = 100 Ω
// how_it_works.md

Why you need a series resistor

LEDs are current-driven. Connect them directly to a supply higher than their forward voltage and they pull more current than rated, heat up, and burn out within seconds. A series resistor drops the extra voltage and limits current to a safe level.

The formula

Ohm's law applied to the resistor in series with the LED:

R = (Vs − Vf) / If
  • Vs — supply voltage (e.g. 5V from Arduino, 3.3V from ESP32, 12V from a wall adapter)
  • Vf — LED forward voltage (red ≈ 1.8V, green ≈ 2.1V, blue/white ≈ 3.0V)
  • If — target current in amps (20mA is typical; high-brightness LEDs go higher)

E12 vs E24 series

Standard resistor values come in preferred series. E12 has 12 values per decade (10, 12, 15, 18, 22, …). E24 has 24 (10, 11, 12, 13, 15, 16, …). E24 = finer steps. Most maker kits stock E12. We always snap up from your calculated value so the LED is never over-driven.

Power dissipation

The resistor dissipates P = (Vs − Vf) × If as heat. Pick a resistor rated for at least 2× this number to keep it cool:

  • 1/8 W (0.125W) — most through-hole resistors. Good up to ~60mW dissipation.
  • 1/4 W (0.25W) — common general-purpose. Good up to ~125mW.
  • 1/2 W (0.5W) — for high-current LED strings.
  • 1 W and up — wall-powered builds, automotive, LED arrays.

Common gotchas

  • Vf ≥ Vs — supply too low. Pick higher voltage source or LED with lower Vf.
  • Multiple LEDs in series — add their Vf values together before computing R.
  • RGB LEDs — each color has its own Vf and needs its own resistor.
  • Forgetting the resistor — LED dies almost instantly above ~5V supply.