Skip to content
Electronics 17 min read

Why Do LEDs Need a Resistor? The I-V Curve Explained

Observation recorded
Cinematic poster of young plant leaves glowing under pink LED grow lights, with the title "LEDs Need A Resistor" in large condensed type and the line "Or the current runs away.".

Take a standard 5 mm red LED, the Kingbright WP7113SRD/D. Its datasheet says it draws 20 mA at a typical forward voltage of 1.85 V. Raise the voltage across it to 1.95 V, a change you could not see on a cheap multimeter's last digit, and our model of its measured curve says the current jumps to about 56 mA. The part's absolute maximum DC rating is 30 mA. A tenth of a volt took it from comfortable to overloaded.

A 6 V torch bulb does nothing of the sort. Feed it 5% too much voltage and it draws about 3% more current. That contrast is the whole story of why LEDs need a resistor, and it is worth seeing properly, because the usual explanation ("the resistor drops the extra voltage") misses what is going on.

Quick answerAn LED's current rises exponentially with voltage, so a tiny supply or temperature change causes a huge current change. A series resistor converts that into a nearly linear, predictable current: I=(Vsupply−VF)/RI = (V_{\mathrm{supply}} - V_F)/R. Without it, the LED's current is set by luck, not by design.
Infographic: Why do LEDs need a resistor? A glowing red LED illustrates that adding just 0.1 volt takes a red LED from 20 mA to 56 mA, nearly double its 30 mA limit, because its current doubles for every 30 mV. A chart of current against voltage shows a filament bulb staying almost flat (1.03 times its rated current at 5% over voltage) while the LED shoots up to 2.7 times. Tiles: a 150 ohm resistor sets 21 mA for a red LED on 5 V; with it, a 0.1 V shift in forward voltage changes the current by about 3%; the resistor formula gives 0 ohms for a white LED on 3.3 V, meaning no headroom. Myth busted: the resistor is not just eating extra voltage, it is a feedback loop that regulates current.
Tap the image to view it full size. View the accessible, editable SVG.

Why does an LED need a resistor when a light bulb doesn’t?

Both are lamps you connect to a voltage. The difference is in how their current responds when that voltage changes, which is what an I-V curve shows. Figure 1 puts both on the same normalized axes: voltage as a fraction of the rated voltage, current as a fraction of the rated current.

Normalized current versus voltage for a red LED, a tungsten filament bulb and a plain resistor. The LED curve is flat until about 0.9 of rated voltage and then rises almost vertically, reaching 2.7 times rated current at 5 percent over voltage, while the tungsten curve bends over and gives only 1.03 times rated current.
Figure 1. I-V curves on normalized axes. The LED curve is a Shockley-diode model fitted to the Kingbright WP7113SRD/D datasheet graph. The filament curve is computed from tungsten's measured resistivity versus temperature with radiated power proportional to T4, rated at 2,700 K. At 5% over voltage the LED draws 2.7 times its rated current; the bulb draws 1.03 times.

The tungsten filament is self-correcting. Its resistance rises with temperature: tungsten's resistivity at 2,700 K is about 14.3 times its room temperature value, according to the tabulated data compiled by the Physics Factbook. So a cold filament has roughly 1/13 to 1/15 of its working resistance. Push more voltage in, the filament gets hotter, its resistance climbs, and the extra current is mostly cancelled. That is negative feedback built into the metal. It is also why bulbs tend to fail at switch-on, when the cold filament gulps an inrush current of roughly ten times its running current or more.

An LED has the opposite personality. Below about 1.6 V the red LED barely conducts at all. Above that, current climbs exponentially and nothing inside the device pushes back. Worse, as we will see, heating makes it conduct more, not less. The bulb is its own current regulator. The LED needs one bolted on.

How steep is an LED’s I-V curve, in numbers?

The physics is the Shockley diode equation. For forward voltages well above a few tenths of a volt:

I=ISexp⁡ ⁣(VnVT)VT=kTq=25.7 mV\begin{aligned}I &= I_S \exp\!\left(\frac{V}{n V_T}\right) \\ V_T &= \frac{kT}{q} = 25.7\ \mathrm{mV}\end{aligned}

VTV_T is taken at 25 °C. nn is the ideality factor: 1 to 2 for most silicon and red LEDs, higher for blue and white InGaN parts.

To get n for a real part, I fitted the equation, plus a small internal series resistance RS, to the forward-current graph in the WP7113SRD/D datasheet (which reads about 1.70 V at 1 mA, 1.82 V at 10 mA and 1.90 V at 30 mA). The best fit is n = 1.7 and RS = 1.5 Ω. Now the worked calculation:

Step 1. Pure exponential term, +0.1 V

nVT=1.7×25.7 mV=43.7 mVI2I1=exp⁡ ⁣(0.1000.0437)=e2.29=9.9×\begin{aligned}n V_T &= 1.7 \times 25.7\ \mathrm{mV} = 43.7\ \mathrm{mV} \\ \frac{I_2}{I_1} &= \exp\!\left(\frac{0.100}{0.0437}\right) = e^{2.29} = \mathbf{9.9\times}\end{aligned}

Step 2. Current doubles every

ΔV=nVTln⁡2=43.7 mV×0.693=30 mV\begin{aligned}\Delta V &= n V_T \ln 2 \\ &= 43.7\ \mathrm{mV} \times 0.693 = \mathbf{30\ mV}\end{aligned}

Step 3. Include the 1.5 Ω internal resistance

At 1.95 V the model solves to 56 mA (2.8× the 20 mA rating, 1.9× the 30 mA maximum). At 2.05 V it gives 105 mA.

The internal resistance tames the curve somewhat (9.9× becomes 2.8×), but only somewhat. Compare a resistor, where 5% more voltage means exactly 5% more current, and the tungsten bulb, where it means 2.6%. For the LED it means 166%.

White LEDs are softer. The WP7113QWC/D white LED's curve (about 2.55 V at 1 mA, 3.25 V at 20 mA, 3.5 V at 30 mA) fits n ≈ 3.6 with roughly 22 Ω of internal resistance. A blue or white InGaN die with a high ideality factor is consistent with measurements: a TU Graz student lab measured n = 2.39 for a white LED and 3.43 for a blue one. So 0.1 V extra pushes a white LED from 20 mA to only about 24 mA. That gentler slope is why people get away with mistakes on white LEDs that would kill a red one, and it explains why coin-cell "throwies" work at all.

The misconception: “the resistor drops the extra voltage”

Almost every tutorial frames it this way: your supply is 5 V, the LED "needs" 2 V, so the resistor "eats" the other 3 V. The arithmetic is right. The mental model is wrong in a way that matters.

An LED does not need a voltage. It needs a current, and its voltage is a consequence of that current, its temperature and the particular die you happened to buy. The datasheet does not even pin it down: the WP7113SRD/D lists 1.85 V typical and 2.5 V maximum at 20 mA. You cannot "give the LED 1.85 V" because you do not know which LED you have, and because 1.85 V on a warm one is a different current than 1.85 V on a cold one.

The better model: the resistor is a current sensor and regulator in one. Any rise in current raises the voltage across the resistor, which leaves less for the LED, which pulls the current back down. The resistor turns the LED's steep exponential into the gentle slope of Ohm's law. In control terms, it is negative feedback with a loop gain set by R compared with the LED's own dynamic resistance (about 3.6 Ω for our red LED at 20 mA).

A second myth falls out for free: the resistor does not have to be on the anode side. Series current is the same everywhere in the loop, so a resistor on the cathode limits it identically.

How do you calculate the LED resistor value?

The formula everyone uses is fine, as long as you check the worst case afterwards:

R=Vsupply−VFItarget,PR=I2RR = \frac{V_{\mathrm{supply}} - V_F}{I_{\mathrm{target}}},\qquad P_R = I^2 R

Example 1: red LED from 5 V at 20 mA

R=5.00−1.85 V0.020 A=157.5 Ω→150 ΩItyp=5.00−1.85150=21.0 mAImax⁡VF=5.00−2.50150=16.7 mAPR=0.0212×150=66 mWPLED=1.85×0.021=39 mW\begin{aligned}R &= \frac{5.00 - 1.85\ \mathrm{V}}{0.020\ \mathrm{A}} = 157.5\ \Omega \\ &\to \mathbf{150\ \Omega} \\ I_{\mathrm{typ}} &= \frac{5.00 - 1.85}{150} = 21.0\ \mathrm{mA} \\ I_{\max V_F} &= \frac{5.00 - 2.50}{150} = 16.7\ \mathrm{mA} \\ P_R &= 0.021^2 \times 150 = 66\ \mathrm{mW} \\ P_{\mathrm{LED}} &= 1.85 \times 0.021 = 39\ \mathrm{mW}\end{aligned}

150 Ω is the nearest E12 value. The 16.7 mA line is for a 2.5 V maximum-VFV_F LED (model: 16.8 mA). A 1/8 W or 1/4 W resistor is plenty, and the LED stays well under its 75 mW rating.

The load line in Figure 2 shows why the result is robust. The resistor's straight line crosses all three LED curves within a few milliamps of each other, even though the curves themselves are spread across 0.75 V.

Load line plot: a straight line from 33 milliamps at 0 volts to zero at 5 volts crosses three steep red LED curves with forward voltages of 1.75, 1.85 and 2.50 volts, giving currents of 21.6, 21.0 and 16.8 milliamps. Inset schematic shows 5 volts, a 150 ohm resistor and an LED to ground.
Figure 2. Load-line view of Example 1. Each dot is where the resistor line meets an LED curve: 21.6 mA for a low-VF part, 21.0 mA typical, 16.8 mA for a part at the datasheet maximum. Without the resistor, the same three LEDs at a fixed voltage would differ by orders of magnitude.

Example 2: red LED from a 3.3 V microcontroller pin at 10 mA

VF(10 mA)≈1.81 VR=3.30−1.810.010=149 Ω→150 Ω\begin{aligned}V_F(10\ \mathrm{mA}) &\approx 1.81\ \mathrm{V} \\ R &= \frac{3.30 - 1.81}{0.010} = 149\ \Omega \\ &\to \mathbf{150\ \Omega}\end{aligned}

VFV_F is read from the datasheet graph. Current: 10.0 mA for a typical part, 5.8 mA for a 2.5 V maximum part.

Ten milliamps is bright for a modern indicator, and it keeps you well inside the pin limits of a typical microcontroller. The ATmega328P on an Arduino Uno, for example, has an absolute maximum of 40 mA per I/O pin, and the pin's own output resistance (tens of ohms) adds a little extra limiting that you should not rely on.

Example 3: white LED from 5 V at 20 mA

R=5.00−3.300.020=85 Ω  →  82 ΩR = \frac{5.00 - 3.30}{0.020} = 85\ \Omega \;\to\; \mathbf{82\ \Omega}

Current: 20.6 mA for a typical part, 14.2 mA for a 4.0 V maximum part.

Why a white LED on 3.3 V is a trap

Run Example 3 on a 3.3 V rail and the formula gives (3.3−3.3)/0.020=0 Ω(3.3 - 3.3)/0.020 = 0\ \Omega. That is the formula telling you there is no headroom left for regulation. Connect the LED directly and you get 20 mA from a typical part, about 24 mA from one 0.1 V lower, and about 1 mA from one at the 4.0 V maximum. Nothing is setting the current except the LED's own spread.

The general rule is a one-line sensitivity estimate. If the LED's forward voltage shifts by ΔVF\Delta V_F (part-to-part spread or temperature), the current shifts by roughly:

ΔII≈ΔVFVsupply−VF\frac{\Delta I}{I} \approx \frac{\Delta V_F}{V_{\mathrm{supply}} - V_F}
red, 5 V: 0.13.15=3.2%red, 3.3 V: 0.11.45=6.9%white, 3.4 V: 0.10.1=100%\begin{aligned}\text{red, 5 V:}\ \frac{0.1}{3.15} &= 3.2\% \\ \text{red, 3.3 V:}\ \frac{0.1}{1.45} &= 6.9\% \\ \text{white, 3.4 V:}\ \frac{0.1}{0.1} &= 100\%\end{aligned}

The full model gives 3.1% and 6.6% for the red cases. For the white LED the simple formula breaks down; the LED's internal resistance holds the change to 15.5%.

Plot of percent current change for a 0.1 volt forward voltage shift versus supply voltage from 2 to 12 volts. Both red and white LED curves fall steeply as supply voltage rises: red LED 7 percent at 3.3 volts and 3 percent at 5 volts, white LED 4 percent at 5 volts and much higher near 3.3 volts.
Figure 3. How much the current moves when VF rises by 0.1 V, with the resistor sized for 20 mA at typical VF. The more voltage the resistor gets to drop, the better it regulates. Computed from the fitted LED models.

A useful rule of thumb from this curve: give the resistor at least as much voltage as the LED, and the current will hold within a few percent. If your supply cannot do that, it is time for a current-source driver.

How temperature turns a small error into thermal runaway

A diode's forward voltage at fixed current falls as it warms. Kingbright specifies the temperature coefficient of VF as −1.9 mV/°C for the red WP7113SRD/D and −3.0 mV/°C for the white WP7113QWC/D. Here is what that does with and without a resistor.

Junction 30 °C warmer than 25 °C, red LED

ΔVF=30×(−1.9 mV)=−57 mV\Delta V_F = 30 \times (-1.9\ \mathrm{mV}) = -57\ \mathrm{mV}

Driven at a fixed 1.85 V (no resistor): model current 38.7 mA (was 20 mA), +94%.

Driven from 5 V through 150 Ω:

ΔI=57 mV150 Ω+3.6 Ω=0.37 mA (+1.8%)\Delta I = \frac{57\ \mathrm{mV}}{150\ \Omega + 3.6\ \Omega} = 0.37\ \mathrm{mA}\ (+1.8\%)

The 3.6 Ω is the LED's dynamic resistance.

Now close the loop. More current means more heat, which lowers VF, which raises the current further. With a fixed voltage the loop gain can exceed one, and the LED runs away until it is limited by its own internal resistance or something breaks. With a resistor the loop gain is tiny. This is the second job of the resistor, and it is the one that bites people who "tested it at room temperature and it was fine".

Why do LEDs in parallel need separate resistors?

Parallel LEDs share a voltage, and we have just seen that a shared voltage is the worst way to drive an exponential device. Figure 4 compares two red LEDs of the same part number whose forward voltages differ by 0.1 V, a difference well inside the datasheet's 1.85 V typical to 2.5 V maximum spread.

Two schematics side by side. Left: a single 82 ohm resistor feeds two parallel red LEDs, which draw 7.4 milliamps and 31.8 milliamps. Right: each LED has its own 150 ohm resistor and they draw 21.0 and 21.6 milliamps.
Figure 4. One shared 82 Ω resistor sized for 40 mA total versus one 150 Ω resistor per LED. With the shared resistor, LED B takes 31.8 mA (above its 30 mA rating) and LED A gets 7.4 mA. With separate resistors the split is 21.0 and 21.6 mA.

The shared resistor still regulates the total current well. It just has no say in how that total divides, and the division is set by the exponential curves. Sweep the mismatch and the picture gets clearer:

Line chart of current in each of two parallel LEDs versus forward voltage mismatch from 0 to 150 millivolts. With a shared resistor the currents diverge, one rising past 30 milliamps near 90 millivolts mismatch, the other falling toward 4 milliamps. With separate resistors both stay near 21 milliamps.
Figure 5. Computed current split versus forward voltage mismatch. Dashed: shared resistor. Solid: one resistor per LED. Thermal feedback makes the dashed curves worse in practice, because the LED carrying more current heats up and its VF drops further.

Every 10 mV of mismatch moves about 1.3 mA from one LED to the other, and 10 mV is the shift from a 5 °C temperature difference. To be fair to the other side: Analog Devices notes that modern LEDs of the same type and manufacturer are often matched well enough that resistors can be omitted with negligible intensity mismatch in many cases. That is a statement about brightness matching at low current, not a guarantee against overstress. Separate resistors cost a cent each. Use them, or put the LEDs in series, where the same current flows through all of them by definition.

When should you use a constant-current LED driver instead?

A resistor is a crude current source: good when the supply has plenty of headroom and wastes no more than you can afford. In Example 1 the resistor burns 66 mW to deliver 39 mW to the LED, so 37% efficiency. That is irrelevant for an indicator and unacceptable for a 3 W lighting LED.

Use a proper current source when:

  • Headroom is small, as with white LEDs on 3.3 V or a long series string close to the supply voltage. A two-terminal linear regulator such as onsemi's NSI45020 holds about 20 mA across a wide voltage range and turns on with only about 0.5 V across it.
  • Power is high. Above roughly half a watt of LED power, a switching constant-current driver (a buck converter that regulates current instead of voltage) is more efficient and keeps the junction cool.
  • Brightness must match across many LEDs, as in displays and backlights. Multi-channel sink drivers set every channel's current from one reference resistor.
  • The supply varies, as with a car's nominal 12 V rail, which sits well above 12 V whenever the alternator is charging.

For dimming, change the duty cycle (PWM) rather than the resistor. The LED sees either its design current or zero, so its colour stays put and the resistor math above still holds.

The short version for your bench: pick a current (5 to 10 mA for an indicator, rarely more than 20 mA for a 5 mm LED), compute R from typical VF, then check the current with the maximum VF and the resistor's power. If the resistor gets less than about a volt to work with, it is the wrong tool.

FAQ

Can you connect an LED without a resistor?

Only if something else limits the current, such as a constant-current driver, a coin cell with high internal resistance, or a supply that is current-limited. Connected straight to a stiff voltage source, a red LED's current rises about threefold for every 0.1 V above its rated forward voltage, so it will usually overheat or degrade quickly.

Does the resistor go before or after the LED?

It does not matter. In a series circuit the same current flows through every element, so a resistor on the anode side and a resistor on the cathode side limit the current identically. Choose whichever side makes the layout or switching easier.

What resistor do I need for an LED on 5V?

Use R = (supply voltage minus LED forward voltage) divided by the desired current. For a red LED (about 1.85 V) at 20 mA that is (5 minus 1.85) / 0.020 = 157 ohms, so 150 ohms is the nearest common value. For a white LED (about 3.3 V) it is 85 ohms, so use 82 ohms.

Can I use one resistor for several LEDs in parallel?

It is a bad idea. Small forward voltage differences between LEDs make the current split unevenly. With a 0.1 V mismatch between two red LEDs sharing one resistor, one LED can take about 32 mA and the other about 7 mA. Give each LED its own resistor, or put the LEDs in series.

What happens if the LED resistor value is too high?

Nothing harmful: the LED simply runs at lower current and looks dimmer. Modern indicator LEDs are often perfectly visible at 2 to 5 mA, so erring high is the safe direction.

Sources

  1. Kingbright, WP7113SRD/D 5 mm super bright red LED datasheet (VF 1.85 V typ, 2.5 V max at 20 mA; TC of VF −1.9 mV/°C; IF 30 mA max; forward current graph): kingbrightusa.com/images/catalog/SPEC/WP7113SRD-D.pdf
  2. Kingbright, WP7113QWC/D 5 mm white LED datasheet (VF 3.3 V typ, 4.0 V max at 20 mA; TC of VF −3.0 mV/°C): kingbrightusa.com/images/catalog/SPEC/WP7113QWC-D.pdf
  3. The Physics Factbook, "Resistivity of Tungsten" (table of resistivity from 300 K to 3,600 K, after T. W. Zerda, TCU): hypertextbook.com/facts/2004/DeannaStewart.shtml
  4. Shockley diode equation and ideality factor: en.wikipedia.org/wiki/Shockley_diode_equation
  5. TU Graz, "I/V curve measurement of different types of diodes" (fitted ideality factors 2.39 white, 3.43 blue): lampz.tugraz.at/~hadley/semi/studentreports/ws22/blue_white_leds/Diode_LED.html
  6. Analog Devices, "Driving LEDs with push-pull port expander outputs" (resistors and current balancing): analog.com technical article PDF
  7. Pololu blog, LEDs in parallel and series resistors: pololu.com/blog/9
  8. Arduino Playground, ATmega328P pin current limitations (40 mA per I/O pin absolute maximum): arduino.cc/playground/Main/ArduinoPinCurrentLimitations
  9. onsemi NSI45020 constant current regulator, 20 mA, 45 V: octopart.com/part/onsemi/NSI45020T1G

Method note: LED curves are a Shockley-equation fit (with series resistance) to the manufacturer's typical forward-current graphs at 25 °C. Individual parts differ; the worst-case checks above use datasheet maximums.

Header image: NASA (image KSC-2014-2868), regraded for this article.

Related observations
Projects Building Your Own Quadcopter Drone: Essential Parts and Specifications in India Electronics How Does an MPPT Charge Controller Work? Real Curves Electronics LiPo C Rating Explained: Current, Sag and Real Limits
Transmit