Electronics Basics · Tutorial · 8 min

LED Current-Limiting Resistor: Theory and Calculation — a complete guide from formula to part selection

Putting a resistor in series with an LED is almost every electronics beginner's first hurdle. The formula R=(Vs−Vf)/I is everywhere online, but the steps that really trip people up come afterward: whether to round the standard value up or to the nearest, how much margin to leave on the power rating, and how to wire multiple LEDs. This article explains the trade-offs and pitfalls behind the formula once and for all — then just use the LED Resistor Calculator at the end to compute it in one click.

Why an LED must have a series resistor

An LED is a constant-voltage device: its current rises exponentially with the voltage across it. The moment the voltage exceeds the forward voltage (Vf) by even a little, the current shoots up. Connect a Vf≈2V red LED straight to a 5V supply and, in theory, the current spikes to hundreds of milliamps or even over an amp — far beyond the ~20mA it can tolerate, burning it out almost instantly.

The fix is to put a current-limiting resistor in series, so the excess voltage (Vs−Vf) drops across the resistor, and Ohm's law locks the current to the value you want. The diagram below shows the most basic connection:

Vs + R = (Vs−Vf)/I LED (Vf) Current I is the same around the loop
Figure 1: The basic series loop of supply → current-limiting resistor → LED. The resistor absorbs the (Vs−Vf) voltage and sets the current to the target I.

The core formula and its derivation

The whole loop is in series, so the current is the same everywhere. The supply voltage Vs splits into two parts: Vf across the LED, and (Vs−Vf) across the resistor. Apply Ohm's law U=IR to the resistor — divide the resistor voltage (Vs−Vf) by the target current I — and you get the resistance:

R = (Vs − Vf) / I

The power dissipated in the resistor (which determines the power rating you need to choose):

P = (Vs − Vf) × I = I² × R

For example: USB 5V supply, red LED (Vf=2V), targeting 20mA → R=(5−2)/0.02=150Ω, P=(5−2)×0.02=60mW. That simple — the hard part is all in the rounding and part selection that follow.

Forward voltage by color — quick reference

When you don't have a datasheet, use the empirical range by color (calculate using the upper end first, which is conservative):

LED colorTypical forward voltage Vf
Red / infrared1.8 – 2.2V
Yellow / orange / yellow-green2.0 – 2.4V
Pure green2.8 – 3.2V
Blue / white / violet3.0 – 3.4V

⚠️ This is a reference range; for the same color, different part numbers can differ by up to ±0.5V, and Vf also rises at higher currents. For precise design, defer to that LED's datasheet, or measure with a multimeter's diode mode.

Why standard values are "rounded up"

150Ω happens to be available, but what about 700Ω? Off-the-shelf resistors only come in discrete E-series standard values (E24 has 24 values per decade: …680, 750, 820…), and 700Ω simply doesn't exist. So should you take 680 or 750?

Circflow's strategy is to "round up to the nearest E24 value", rather than the "round to nearest" that many calculators default to. The reason is the direction of safety: a slightly larger resistor → a slightly smaller current → better the LED is a touch dimmer than over-current and short-lived. The table below gives three real examples, listing the exact value, the rounded-up E24 value, and the actual current back-calculated after picking the standard value — note that the actual current is always ≤ the target:

SupplyLEDTarget IExact RE24 (up)Actual currentDissipation → rating
5V (USB)2.0V red20mA150Ω150Ω20.0mA60mW → 1/4W
9V battery2.0V red10mA700Ω750Ω9.3mA65mW → 1/4W
5V (USB)3.2V blue20mA90Ω91Ω19.8mA36mW → 1/8W

The second row makes the point best: rounding 700Ω up to 750Ω drops the actual current from 10mA to 9.3mA — a safety margin appears automatically. Round down to 680Ω instead and the current becomes 10.3mA, over the target you set. When you need to look up nearest standard values in bulk, use the Nearest E-Series Value tool.

How to choose the power rating

The computed resistor dissipation is only the minimum requirement; real part selection leaves margin. Rule of thumb: choose a power rating ≥ 2× the actual dissipation from the common ratings (1/8W=125mW, 1/4W=250mW, 1/2W=500mW, 1W…).

A six-step practical method

  1. Determine the supply voltage Vs (USB=5V, Li-ion=3.7V, 9V battery, etc.).
  2. Look up/estimate the LED forward voltage Vf (datasheet first, otherwise take the upper end from the color table).
  3. Set the target current I (5–20mA for an ordinary indicator; smaller is more efficient and longer-lived).
  4. Compute R=(Vs−Vf)/I.
  5. Round up to the nearest E24 standard value, and back-calculate the actual current to confirm it is ≤ the target.
  6. Compute P=(Vs−Vf)×I and choose a power rating ≥2× P.

These six steps are exactly the process the LED Resistor Calculator runs for you — enter three numbers and it gives you the standard value and power rating together.

5 common mistakes

  1. Computing the current directly from the supply voltage: forgetting to subtract Vf and dropping the full 5V across the resistor, ending up with too large a resistor and a dim LED (a relatively safe mistake).
  2. Rounding the standard value to the nearest, ending up too small: taking 700Ω down to 680Ω, the current quietly exceeds the limit and long-term operation accelerates degradation.
  3. A power rating that is just barely adequate: computing 250mW and choosing 1/4W means the resistor runs hot year-round with a shortened life.
  4. Several LEDs sharing one resistor in parallel: Vf part-to-part variation causes uneven current sharing, and the weakest one dies first — see the next section.
  5. Ignoring supply voltage fluctuation: USB is actually 4.75–5.25V, and LEDs with low Vf are affected more by the fluctuation, so leaving some margin is more stable.

Advanced: multiple LEDs, voltage fluctuation, dimming

Multiple LEDs: prefer series; in parallel, give each its own resistor

Series: several LEDs connected end to end share one resistor, with the same current and the most even brightness, but this requires Vs > the sum of the Vf values + margin (e.g. 3 red 2V LEDs in series need Vs≳6V+margin, so 5V is not enough). Parallel: each branch must have its own series resistor; never let several LEDs share a single resistor in parallel, or the one with the lowest Vf grabs the current and lights up brightest and ages first.

Supply voltage fluctuation

The current is proportional to (Vs−Vf). When Vf is large (e.g. blue at 3.2V, leaving only a 1.8V difference at 5V), the same ±0.25V supply fluctuation has a larger percentage effect on the current. In such cases set the target current more conservatively, or consider a constant-current driver.

PWM dimming

To adjust brightness, don't rely on increasing the resistor to lower the current (which changes color and efficiency); instead switch on and off rapidly with PWM: the resistor is still sized for the rated current, and the duty cycle adjusts the average brightness, leaving both color and instantaneous current unchanged.

🛑 The formulas and figures in this article are reference estimates. LED forward voltage and current limits vary by part number, and resistors come in discrete standard values; for actual production, defer to the device datasheet and local codes. For high-brightness/high-power LEDs, always check thermal management and rated current.

FAQ

Does an LED always need a current-limiting resistor?
An LED is a constant-voltage (exponential I–V) device and does almost nothing to limit its own current. Connected straight to a supply, the current spikes to hundreds of milliamps in an instant and burns out the chip. Unless the supply itself is a constant-current source (such as a constant-current driver IC), you must put a current-limiting resistor in series or use a constant-current driver.
What if I don't know the LED's forward voltage?
Check that LED's datasheet first. If you don't have it on hand, estimate by color: red about 1.8–2.2V, yellow-green about 2.0–2.4V, blue-white about 3.0–3.4V. Calculate using the upper end of the range first (conservative — smaller current, safer), then confirm by measuring with a multimeter's diode mode.
Why take a standard value for the resistor, and why round up?
Resistors only come in discrete E-series standard values (such as E24), so the exact computed value is often unavailable. Rounding up to the nearest standard value makes the resistor slightly larger and the current slightly below the target — better a touch dimmer than over-current, which is the safest direction for the LED.
How do I choose the power rating?
First compute the resistor's dissipation P=(Vs−Vf)×I, then pick a common power rating ≥2× P (1/8W, 1/4W, 1/2W, 1W…). The 2× margin is for temperature control and long-term reliability; derate further in enclosed or high-temperature environments.
Can several LEDs share one resistor in parallel?
Strongly discouraged. LED forward voltages vary part to part, so in parallel the one with the lowest forward voltage grabs most of the current, lighting up brightest and aging first, with uneven brightness too. The correct approach is to give each LED its own series resistor, or wire them in series to share one resistor.
⚡ Powered by Circflow