How to Calculate an LED Series Resistor
Published 1/26/2026 · 5 min read · Everyday calculators
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 →Related tools
Sources
Spotted a mistake in this article?