LED series resistor:
formula and worked example
An LED has almost no resistance of its own once it conducts, so the resistor you add is what sets the current.
Calcylator Editorial Team
Updated · 6 min read
Why an LED needs a resistor at all
An LED is not a resistor-like part. Once the supply passes its forward voltage it conducts, and the current climbs very steeply for a small further rise in voltage. Connected straight to a supply, it draws whatever current the source can give, and it burns out within moments.
A series resistor fixes the problem by taking up the surplus voltage. The LED holds close to its forward drop, the resistor drops the rest, and Ohm's law then sets the current. Choosing the resistor is therefore the same as choosing the current, and with it the brightness and the life of the LED.
- Supply: the voltage feeding the LED and resistor together, in volts.
- LED drop: the forward voltage of the LED at the working current, in volts, taken from its datasheet.
- LED current: the current you want through the LED, in amperes (20 mA is 0.02 A).
The formula and the unit trap
- supply_v:
- Supply v
- led_drop_v:
- Led drop v
- led_current_a:
- Led current a
It is Ohm's law applied to the voltage the resistor must absorb: supply minus LED drop, divided by the current. The one place people slip is units. Datasheets quote milliamps, the formula wants amperes, and entering 20 instead of 0.02 gives a resistor a thousand times too small.
The forward drop varies with colour and with part, which is why you read it rather than guess. Red and yellow parts typically sit near the low end of the range, while blue and white drop more. Treat the numbers as datasheet items, not memorised constants.
Worked example: a 12 V supply, 2 V LED, 20 mA
A single LED with a 2 V forward drop is to run at 20 mA from a 12 V supply. The resistor must absorb 10 V at 0.02 A.
- Find the voltage the resistor must take: 12 − 2 = 10 V.
- Convert the current to amperes: 20 mA = 0.02 A.
- Divide: 10 ÷ 0.02 = 500 Ω.
- Check the power in the resistor: 10 V × 0.02 A = 0.2 W.
Supply v
12
Led drop v
2
Led current a
0.02
LED series resistor
500 Ω
Worked from the inputs shown: 10 V must be dropped across the resistor at 20 mA.
500 Ω is not a standard value in the common E12 series, so you would pick the nearest value at or above it, 560 Ω. The current then falls slightly to about 17.9 mA, which is invisible to the eye and gentler on the LED.
Choosing the real component
The calculation gives an ideal value; the part you buy has to survive in a circuit. Two checks come after the arithmetic, and the second one is often missed.
- Round up, not down: a higher resistance means less current, which is always the safe direction. Rounding down lets the LED exceed its rating.
- Power: here 0.2 W is dissipated, so a 0.25 W resistor is running at 80% of its rating and gets warm. A 0.5 W part is the comfortable choice.
- Current margin: many designers run LEDs below their maximum rating, around 10 to 15 mA for indicators, because they are bright enough and last longer.
Brightness is not linear in current, and eyes are forgiving, so halving the current rarely halves the apparent brightness.
How a supply change moves the resistor
The table raises only the supply by 10%, from 12 V to 13.2 V, and the required resistor rises from 500 Ω to 560 Ω. The percentage change in the resistor is 12%, larger than the supply's 10%, because the resistor only absorbs the difference above the LED drop.
| Scenario | Supply v | Calculated result |
|---|---|---|
| Original assumptions | 12 | 500 Ω |
| Supply v increased by 10% | 13.2 | 560 Ω |
The same effect hurts in the other direction. Keep the 500 Ω resistor but let the supply creep to 13.2 V and the current becomes 11.2 ÷ 500 = 22.4 mA, about 12% over target. The lower the headroom between supply and LED drop, the more the current swings with the supply, which is the case for battery-powered LEDs.
Mistakes that kill LEDs or waste power
- Milliamps entered as amperes, giving a resistor a thousand times too small.
- Using the wrong forward voltage, for example a red LED figure for a white LED, which shifts the current noticeably.
- Placing several LEDs in series and still subtracting one drop; the drops add, so subtract all of them before dividing.
- Putting LEDs in parallel on one shared resistor, so one LED hogs the current and fails first.
A short checklist before soldering
For a string of LEDs from the same 12 V rail, add up the forward drops first. Three 2 V LEDs in series drop 6 V, leaving 6 V for the resistor; at 20 mA that is 300 Ω, and the power is 0.12 W. Series strings use less total current than three separate branches, which is why they are preferred on a fixed supply.
- Read the forward voltage and the recommended current from the datasheet.
- Add the drops of every LED in the series string.
- Compute the resistor and round up to a standard value.
- Compute the power and choose a rating at least twice that figure.
- Recalculate the current at the highest supply voltage you expect.
Common questions
How do I calculate the resistor for an LED?
Subtract the LED's forward voltage from the supply, then divide by the current you want in amperes. For a 12 V supply, a 2 V LED and 20 mA, the resistor is 10 ÷ 0.02 = 500 Ω.
What happens if I choose a resistor that is too small?
The LED draws more current than it is rated for, runs hotter and dims or fails early. Because LED current rises steeply with voltage, a small error in resistance can produce a large change in current.
Should I round the resistor up or down?
Round up to the next standard value. A slightly higher resistance lowers the current a little, which is safe and barely visible. Rounding down raises the current above the target and shortens the LED's life.
How do I find an LED's forward voltage?
Read it from the LED's datasheet at your chosen current. It differs by colour and by manufacturer. If you have no datasheet, measure it with a meter's diode test or in a test circuit at low current.
Can I run several LEDs from one resistor?
Yes in series, if the supply covers all the drops; subtract each LED's drop before dividing. In parallel, it is better to give each LED its own resistor, since small differences in forward voltage cause uneven current sharing.
Was this guide helpful?
Continue reading
View all blogsResistor power dissipation: formula and worked example
Find the power a resistor dissipates from current and resistance using P = I²R, with a 0.5 A example and guidance on choosing a safe wattage rating.
5 min read
Electrical energy in joules: formula and worked example
Convert power and time into electrical energy in joules with E = P × t, with a 65 W charger example and the link to watt-hours and kWh on a bill.
5 min read
Capacitor reactance: formula and worked example
Calculate capacitor reactance Xc = 1/(2πfC) in ohms, with a 10 µF at 50 Hz example and how frequency and capacitance change the AC opposition.
5 min read




