Free calculator
LED resistor calculator
An LED needs a resistor in series to set its current. The LED keeps its forward voltage for itself, and the resistor takes whatever is left of the supply. Type your supply, pick the LED's colour and the current you want, and this gives the resistor to fit.
A USB port or Arduino pin is 5 V.
Sets the forward voltage below.
From the LED's datasheet, if you have it.
20m = 20 mA, a typical small LED's limit.
Resistor to fit
- Exact value
- 350 Ω
- Current with it
- 17.9 mA
- Resistor's power
- 126 mW
- Rating to buy
- ½ W or more
- Colour bands
- orange, white, brown
- Each LED's power
- 35.9 mW
350 Ω isn't a value you can buy, so this rounds up to the next standard (E12) value. Rounding up keeps the current at or under your target.
The sum
For a string of LEDs in series, take off every LED's forward voltage: Vsupply − n × VLED.
A worked example
A 9 V battery, a red LED that drops about 2.0 V, and a target of 20 mA:
350 Ω isn't a value you can buy, so round up to the next standard (E12) value: 390 Ω. That gives (9 − 2) ÷ 390 ≈ 18 mA, a touch under the target. The resistor burns 7 × 0.018 ≈ 0.126 W, just over half a ¼ W part's rating, so a ½ W resistor will run cooler and last longer.
Free lesson
Now build it yourself
Each lesson comes in three short parts: see the idea, try it on a live board, then build it yourself, with quick checks as you go.
“Ohm's law” is lesson 5 of 6 in Copper Flats, Electronics World 1. Free with an account. Lessons unlock in order, so you’ll do the 4 before it first.
Or start from the very first lesson, no account neededThe ideas behind it
- What resistor does an LED need on an Arduino?220 Ω or 330 Ω? Work out the LED's current from a 5 V pin, colour by colour.
- How to wire LEDs in seriesOne path, one current: subtract every LED's drop, then size a single resistor for the string.
- Build an LED flashlight circuitThree cells, a switch, a resistor and a white LED: a whole flashlight, worked out on paper first.
- Ohm's law explainedV = I × R: set any two of voltage, current and resistance and the third follows.
Questions people ask
What resistor do I need for an LED on 5 V?
For a red LED at 20 mA: (5 − 2.0) ÷ 0.02 = 150 Ω, which is a standard value. A blue or white LED drops about 3.2 V, so (5 − 3.2) ÷ 0.02 = 90 Ω, and you'd fit 100 Ω.
Why round up and not down?
A bigger resistor means less current. Rounding up keeps the LED at or under the current you chose; rounding down pushes it over.
Can several LEDs share one resistor?
In series, yes: one resistor sets the current for the whole string, as long as the supply is bigger than all their forward voltages added up. In parallel, give each LED its own resistor, because the one with the lowest forward voltage would take most of the current.
What current should an LED run at?
Most small 5 mm LEDs are rated 20 mA, and many are bright enough at 5–10 mA. An Arduino pin should stay well under 20 mA. Check the datasheet for your part.
More calculators
- Ohm's law calculatorAny two of V, I and R give the third, and the power.
- Electrical power calculatorWatts from any two of V, I and R, and the resistor rating that stays cool.
- Resistor colour code calculatorBands to ohms, or ohms to bands, on 4- and 5-band resistors.
- Resistors in series and parallel calculatorThe total of up to eight resistors, in series or in parallel.
- Voltage divider calculatorVout from two resistors, or the resistor for the Vout you need.
- RC time constant calculatorτ, charge time, cutoff frequency and the voltage at any moment.