LED Resistor Calculator

Which resistor stops your LED from burning out?

Exact resistor
200 Ω
Use this standard resistor
220 Ωthe next value up, so the LED is safe
Current with it
13.6 mA
Power in the resistor
0.0409 Wa normal ¼ W resistor is fine

The formula

R = (Vsupply − Vled) ÷ I

Take away the LED's own voltage drop from the supply. What's left falls across the resistor, and Ohm's law gives its value. Use the current in amps (20 mA = 0.02 A).

Worked example: A red LED on an Arduino's 5 V pin

  1. Supply 5 V, red LED drop about 2 V, so the resistor has 5 − 2 = 3 V across it.
  2. Aim for 15 mA = 0.015 A.
  3. R = 3 ÷ 0.015 = 200 Ω. The next standard value up is 220 Ω, which is why 220 Ω is in every starter kit.
  4. Power in the resistor = 3 V × 0.015 A = 0.045 W, so a normal ¼ W (0.25 W) resistor is plenty.

Common questions

What happens if I connect an LED without a resistor?

On a 5 V supply the current shoots far past the LED's 20–30 mA limit, it gets hot and dies, sometimes with a pop. Tiny coin cells are an exception only because the battery itself can't give much current.

Should I round the resistor up or down?

Always up, to the next standard value. A slightly bigger resistor gives a slightly dimmer LED, which is safe. Rounding down pushes more current than you planned.

Does it matter which side of the LED the resistor goes?

No. In a series circuit the same current flows everywhere, so the resistor works before or after the LED.

Why do blue and white LEDs need a smaller resistor?

They drop about 3 V instead of 2 V, so less voltage is left for the resistor. Less voltage for the same current means fewer ohms.