Skip to content
Allin

How to Calculate an LED Series Resistor

Published 1/26/2026 · 5 min read · Everyday calculators

Lena Hoffmann

Lena HoffmannScience & education writer at Allin

Mathematics · Physics

Checked against 2 sources

View profile
In short

To size an LED's series resistor, subtract the LED's forward voltage (Vf) from the supply voltage (Vs) and divide by the target current (I): R = (Vs − Vf) / I. For a red LED with Vf = 2.0 V run at 20 mA (0.020 A) from a 5 V supply, R = (5 − 2.0) / 0.020 = 150 Ω. Round up to the nearest standard value and check the resistor's power rating.

Size the series resistor for any LED with one formula: R = (Vs − Vf) / I. Follow the steps, see a worked 5 V example, and pick the right resistor.

Why an LED needs a resistor at all

An LED is a diode, not a resistor: above its forward voltage, a tiny increase in voltage causes a huge increase in current. Connect an LED directly across a supply and the current runs away, overheating and destroying the junction in an instant. A series resistor solves this by absorbing the difference between the supply and the LED's forward voltage, holding the current at a safe, predictable value.

The resistor works because the supply voltage divides between the LED and the resistor. The LED drops its fixed forward voltage Vf; the rest, Vs − Vf, appears across the resistor. Ohm's law then sets the current: I = (Vs − Vf) / R. Rearranging to solve for R gives the sizing formula R = (Vs − Vf) / I.

A worked 5 V example

Suppose you drive a red LED (Vf = 2.0 V) at 20 mA from a 5 V supply. The resistor must drop Vs − Vf = 5 − 2.0 = 3.0 V. Then R = 3.0 / 0.020 = 150 Ω. That happens to be a standard value, so a 150 Ω resistor is perfect. For a blue LED with Vf = 3.2 V on the same supply, R = (5 − 3.2) / 0.020 = 90 Ω, so you would pick the next standard value up, 100 Ω.

Always round up, never down. A larger resistance means slightly less current than the target, which is safe; a smaller one pushes more current through the LED and risks damage. The small drop in brightness from rounding up is rarely noticeable, since the human eye responds to light roughly logarithmically.

Power rating and multiple LEDs

Check that the resistor can handle the heat it dissipates: P = (Vs − Vf) × I. In the red-LED example, P = 3.0 × 0.020 = 0.06 W, well within a standard 0.25 W resistor. A good rule is to pick a resistor rated for at least twice the calculated power, giving margin for tolerance and airflow. For higher currents or larger voltage drops, this check matters far more.

For several LEDs, decide series or parallel. In series, add their forward voltages and use one resistor: three red LEDs (Vf = 2.0 V each) on 12 V drop 6.0 V, leaving R = (12 − 6.0) / 0.020 = 300 Ω. Do not simply parallel LEDs on one resistor — small Vf differences make them share current unevenly. Instead, give each LED (or each series string) its own resistor.

Worked with our own calculator

LED resistor calculator

Given

Supply voltage (V)
24
LED forward voltage (V)
4
LED current (mA)
40

Result

Resistor (Ω)
500
Resistor power (W)
0.8

These figures are produced by the calculator below, not typed in by hand — they are recomputed whenever the tool changes.

Run it on your own figures

Frequently asked questions

What if I do not know the LED's forward voltage?
Use a typical value by color: about 2.0 V for red, 2.1 V for yellow, 2.2 V for green, and 3.0–3.4 V for blue and white. These estimates are close enough to size a resistor safely; the datasheet gives the exact figure.
Why round the resistor value up rather than down?
A larger resistor lowers the current slightly below your target, which keeps the LED safe. A smaller one raises the current above the target and can overheat the LED. The tiny brightness loss from rounding up is usually invisible.
Can I use one resistor for several parallel LEDs?
It is not recommended. Small differences in forward voltage make parallel LEDs share current unevenly, so one may hog most of it and burn out. Give each LED its own resistor, or wire them in series with a single resistor for the whole string.
What resistor wattage should I choose?
Compute P = (Vs − Vf) × I and pick a resistor rated for at least twice that. Most small-LED circuits stay under 0.1 W, so a common 0.25 W resistor is fine; higher currents or bigger voltage drops may need 0.5 W or more.

Articles you may find interesting

All guides
ExplainerWhat Is Ohm's Law? V = I × R Explained SimplyOhm's law links voltage, current, and resistance with one equation: V = I × R. Learn the triangle trick and see worked examples.ExplainerWhat Is Voltage Drop? Why Long Wires Lose VoltageVoltage drop is the voltage lost along a wire due to its resistance. Learn how length, gauge, and current affect it, and why it matters for your circuits.ExplainerThe Voltage Divider: The Formula Is Trivial, the Assumption Behind It Is NotVout = Vin·R2/(R1+R2) is only true when nothing is connected to the output. Draw current and the voltage collapses, by an amount that follows one exact law. Here is that law, the ten-times rule checked against it, and why a lower-resistance divider costs you power forever.ExplainerResistors in Series and in Parallel: The Formulas, and the Three Things They Do Not Tell YouSeries adds, parallel adds reciprocals — that part is easy. The parts that catch people: which member dominates the answer, why two 5 % resistors in parallel are still 5 %, and why the smallest resistor in a parallel pair takes the largest share of the power.ExplainerHow Many Cables Fit in a Conduit? It Is a Code Question, Not a Geometry QuestionThe 40 % limit for three or more conductors is not about whether they physically fit. It is about heat and about pulling them in without stripping the insulation — and the moment you use that space, the code takes current away from every conductor in the pipe.How-toHow to Calculate a Dilution with C1V1 = C2V2Solve for the missing term, then convert the answer into a bench instruction. The step almost everyone skips is that the solvent you add is V2 minus V1, not V2.

Related tools

Sources

Spotted a mistake in this article?