Tools / LED series resistor

How to work out an LED resistor

The resistor takes whatever voltage the LED does not, and sets the current. Here is the working with your numbers.

R = (Vs − Vf) ÷ I

Inputs

V
V
mA

Results update as you type. Prefixes work: 4.7k, 100u, 10n.

Result
Resistor
300 Ω
Nearest standard
330 Ω
Current with standard
9.091 mA
Power in the resistor
30 mW
Resistor rating
250 mW
What this leaves out
  • Ideal single LED series resistor estimate. The standard value is the next E12 value up, so the LED runs a little below your target current. Check the LED data sheet.
Step by step

The working with your numbers

  1. Find the voltage left for the resistorV_R = Vs − Vf = 5 − 2 = 3 VThe LED always drops about its forward voltage. The resistor takes the rest.
  2. Change the current to ampsI = 10 mA ÷ 1000 = 0.01 A
  3. Use Ohm's law for the resistorR = V_R ÷ I = 3 ÷ 0.01 = 300 Ω
  4. Work out the heat in the resistorP = V_R × I = 3 × 0.01 = 30 mW

Does the answer make sense?

  • OK: Check it backwards: 3 V ÷ 300 Ω = 10 mA, the current you asked for.
  • OK: 10 mA is within a normal 5 mm LED's 20 mA rating.

Pick a real part

  • 300 Ω is not a value you can buy. Go up to the next standard (E12) value: 330 Ω.
  • With 330 Ω the current is 3 ÷ 330 = 9.09 mA, a little under your target, which is the safe side.
  • It dissipates 27.3 mW, so a 1/4 W resistor is enough.

Common mistakes

  • Forgetting to change mA to amps. Dividing by 10 instead of 0.01 gives a resistor 1000 times too small, and the LED burns out.
  • Using the whole supply voltage instead of what is left after the LED. That gives too big a resistor and a dim LED.
  • Rounding the resistor down. Always pick the next value up so the current stays under your target.

Learn it, try it, build it

Calculated, not measured. Check the exact part datasheet and your real circuit before powering anything.

Several LEDs, a board pin or PWM

Plan more than one LED. The result shows the resistor, what the supply and the pin have to deliver, and what to watch for.

Resistor: 330 Ω (calculated 300 Ω, next standard E12 up)

Current: 9.09 mA per LED chain · 9.1 mA from the supply · pin limit 20 mA

Heat in each resistor: 27.27 mW · average current at 100 %: 9.09 mA

Just need the number? Use the LED series resistor calculator on Geekobot.

Common questions

How do you work out the resistor for an LED?

Take the LED's forward voltage away from the supply, then divide by the current in amps. For a red LED (2 V) on 5 V at 10 mA: (5 − 2) ÷ 0.01 = 300 Ω, so use the next standard value up, 330 Ω.

Why do I need a resistor with an LED?

An LED's current rises very steeply once it turns on, so without something to limit it the current shoots past its rating and the LED burns out. The resistor sets the current.

What wattage resistor do I need for an LED?

Multiply the voltage across the resistor by the current. Most indicator LEDs need well under 0.1 W, so a 1/4 W resistor is fine. Pick a rating at least twice the power you work out.