LED Resistor Calculator

Work out the series resistor you need to safely drive an LED from a given supply voltage.

How to use this calculator

  1. Enter the supply voltage.
  2. Enter the LED forward voltage (Vf) and current in mA.
  3. Set how many LEDs in series.
  4. Click Calculate for the resistor value, nearest standard size and power rating.

Common series resistors (20 mA, nearest E12)

SupplyRed LED (2.0 V)Blue/White (3.2 V)
5 V150 Ω100 Ω
9 V330 Ω330 Ω
12 V470 Ω470 Ω

The formula

R = (Vsupply − n × Vf) / I

Where n is the number of LEDs in series, Vf is each LED's forward voltage, and I is the desired current in amps. The resistor must also dissipate power:

P = (Vsupply − n × Vf) × I

Choose a resistor with a power rating at least double the calculated value to be safe.

Typical LED forward voltages

LED colorForward voltage
Red1.8 – 2.2 V
Yellow / Green2.0 – 2.4 V
Blue / White3.0 – 3.4 V

Most standard 5 mm LEDs run at about 20 mA. Check your LED's datasheet for exact values.

Frequently asked questions

What resistor do I need for an LED on 5 V?
About 150 Ω for a typical 2 V red LED at 20 mA, or about 100 Ω for a 3.2 V blue/white LED. Always check the LED's forward voltage.
What happens if I use no resistor?
Without a current-limiting resistor the LED draws too much current and quickly burns out.
How do I find an LED's forward voltage?
Check the datasheet. Typical values are about 2 V for red, 2.1 V for yellow/green, and 3.0–3.4 V for blue/white.

More calculators

All calculators

Basics & Ohm's law

Resistors & capacitors

Power, wiring & mains

Electronics design