LED Resistor Calculator – Series Resistor & Nearest E12 Value
Use this free LED Resistor Calculator to find the series resistor that protects an LED from burning out. Enter the supply voltage, the LED's forward voltage and the current you want — you get the exact resistor, its power, and the nearest standard E12 value to buy.
An LED is a diode that happens to glow, and like every diode it has a stubborn personality: below its forward voltage it passes almost nothing, and just above that voltage its current tries to rocket upwards without limit. Connect one straight across a battery and the rocket wins — the LED draws far more current than it can survive and destroys itself, sometimes in seconds. The series resistor is the cure: a deliberately chosen resistance that soaks up the surplus voltage and holds the current at the value you intended. This calculator does that choosing for you, returning the exact resistance, the power the resistor must handle, and the nearest standard E12 value to actually buy.
The arithmetic is one line of Ohm's law. The LED keeps its forward voltage Vf for itself; whatever voltage remains, Vs − Vf, must fall across the resistor; and the resistor sets the current by R = (Vs − Vf) ÷ If. Choose If from the LED's datasheet — 20 mA is the classic rating for a standard 5 mm indicator LED, 2–5 mA is plenty for a panel lamp that only needs to be seen — and the resistor follows. Because resistors are sold in standard values, the calculator also rounds up to the next E12 value and tells you the slightly lower, slightly safer current that value will actually deliver.
Three inputs are all it needs: the supply voltage (a battery, a USB port's 5 V, a car's nominal 12 V), the LED's forward voltage (about 2 V for red, 3.2 V for blue and white — the table below lists them all), and the current you want in milliamps. The answer's third figure — power — is the one beginners skip and regret: the resistor converts the surplus voltage into heat, and an undersized part will scorch. The calculator states the power and the minimum sensible rating, twice that figure, in the same breath.
Formula
R = (Vs − Vf) ÷ If • Resistor power: P = (Vs − Vf) × If
If is in amps inside the formula (20 mA = 0.02 A) — the calculator converts for you.
The formula is Kirchhoff's voltage law wearing Ohm's law as a coat: the supply voltage is spent in exactly two places, the LED's forward drop and the resistor's drop, so the resistor's share is Vs − Vf by subtraction; then R = V ÷ I prices that share at the chosen current. The power form follows at once — the resistor's voltage share times the same current — and it explains a counterintuitive fact: the resistor often wastes more power than the LED uses. In the worked example, the LED receives 2 V of the 9 V supply and the resistor burns the other 7 V as heat; the circuit is mostly a heater that happens to indicate. That is the price of simplicity, and it is why high-power LED lighting abandons resistors for constant-current drivers, a point the depth section below takes up.
| Symbol | Meaning | Units |
|---|---|---|
| Vs | supply voltage | volts (V) |
| Vf | LED forward voltage at the chosen current | volts (V) |
| If | forward current you want through the LED | milliamps (mA) here; amps in the formula |
| R | series resistor | ohms (Ω) |
| P | power the resistor must dissipate | watts (W) |
Why the LED cannot be trusted alone: the cliff edge
A resistor's current rises in calm proportion to voltage; an LED's does not. Its current–voltage curve is a cliff: at 1.9 V a red LED may pass a milliamp, at 2.0 V ten milliamps, at 2.2 V a destructive surge. The exact cliff position wanders with temperature and from part to part, so connecting an LED to a stiff voltage source is balancing it on a cliff edge whose location you do not know. The series resistor converts the arrangement into something tame: now the LED's share is pinned near Vf by the diode itself, and the resistor — a well-behaved, proportional component — absorbs every fluctuation. If the supply rises a little, the resistor's drop rises and the current creeps; it cannot rocket, because the resistor's voltage must obey Ohm's law. That is the whole theory of the page: one wild component, one tame component, and the tame one in charge.
It also explains the failure everyone meets once: the LED wired straight to a coin cell sometimes survives. A CR2032's internal resistance is high — tens of ohms — so the cell carries its own accidental series resistor inside. The same LED on a stiff bench supply or a car battery, whose internal resistance is nearly zero, dies instantly. Whether an LED "needs" a resistor is really the question of whether something else in the loop is already doing the resistor's job.
How to use
- Enter your supply voltage (battery or power supply) — use the real figure: a "12 V" car system is nearer 13.8 V with the engine running, and a fresh 9 V battery starts above 9.5 V.
- Enter the LED's forward voltage Vf from its datasheet — about 2 V for red, 3.2 V for blue and white; the quick-reference table below covers the colours.
- Enter the current you want through the LED in milliamps (20 mA is typical; less for indicators, and never above the datasheet maximum). Click "Calculate".
- Buy the E12 value the calculator names — it is the next standard value above the exact answer — and check the stated power: choose a resistor rated at least twice the calculated watts.
- For several LEDs in series, add their Vf values together and enter the sum; for parallel LEDs, give each LED its own resistor rather than sharing one.
Worked examples
Example 1 — the reference circuit. A red LED (Vf = 2 V) runs from a 9 V battery at 20 mA = 0.02 A.
R = (9 − 2) ÷ 0.02 = 350 Ω. Resistor power = 7 × 0.02 = 0.14 W, so a standard 0.25 W resistor is safe. 350 Ω is not an E12 value — the nearest E12 value above it is 390 Ω, which gives (9 − 2) ÷ 390 = 17.949 mA, slightly dimmer but safer.
Example 2 — USB power. A red LED (Vf = 2 V) on a 5 V USB supply at 20 mA.
R = (5 − 2) ÷ 0.02 = 150 Ω, and 150 Ω is itself an E12 value, so the current lands exactly on 20 mA. Power = 3 × 0.02 = 0.06 W — any small resistor shrugs this off.
Example 3 — a white LED in a car. White LED, Vf = 3.2 V, supply 12 V, 20 mA.
R = (12 − 3.2) ÷ 0.02 = 440 Ω; power = 8.8 × 0.02 = 0.176 W. Nearest E12 above: 470 Ω, giving 8.8 ÷ 470 = 18.723 mA. Use a 0.5 W resistor — the calculated power doubled is 0.352 W, over a 0.25 W part's comfortable limit.
Example 4 — low-voltage logic. A red LED with Vf = 1.8 V on a 3.3 V microcontroller pin, at a gentle 10 mA.
R = (3.3 − 1.8) ÷ 0.01 = 150 Ω; power = 1.5 × 0.01 = 0.015 W. Note how little headroom a 3.3 V supply leaves a 3.2 V blue LED — a 0.1 V remainder would demand a tiny, hypersensitive resistance, which is why blue and white LEDs dislike 3.3 V rails.
Example 5 — a blue LED on 9 V. Blue LED, Vf = 3.2 V, supply 9 V, 20 mA.
R = (9 − 3.2) ÷ 0.02 = 290 Ω; power = 5.8 × 0.02 = 0.116 W. Nearest E12 above: 330 Ω, giving 5.8 ÷ 330 = 17.576 mA.
Example 6 — two LEDs in series. Two red LEDs in series on 12 V: their Vf values add, so enter Vf = 4 V at 20 mA.
R = (12 − 4) ÷ 0.02 = 400 Ω; power = 8 × 0.02 = 0.16 W. Nearest E12 above: 470 Ω, giving 8 ÷ 470 = 17.021 mA through both. Series strings share one resistor fairly because the same current must pass through every LED in the chain.
LED resistors in real life
Panel indicators everywhere. Every glowing power lamp on every appliance is this calculation, usually at a miserly 2–5 mA: the LED only needs to be seen, and the lower current stretches both LED life and, in battery gear, the battery itself.
Arduino and hobby projects. The first circuit in a thousand tutorials — LED, 220 Ω or 330 Ω resistor, 5 V pin — is Example 2's family. The values are chosen exactly as this page chooses them, then rounded to whatever the kit provides.
Automotive courtesy lights. Example 3 is the daily reality of car electrics, with the extra twist that the "12 V" supply swings between about 11 V and 14.4 V; designers calculate at the top of the range so the LED survives the alternator's enthusiasm.
LED strips. Flexible 12 V strip is this circuit repeated every few centimetres: groups of three LEDs in series share one small resistor, which is why strips can be cut only at the marked points — each cut segment is a complete, correctly ballasted circuit.
Bicycle and torch lights. Cheap torches often skip the resistor and lean on the battery's internal resistance (the coin-cell effect, scaled up) — which is why they are dazzling on fresh cells and fade as the cells tire, the current following the battery's decline with nothing to regulate it.
When resistors stop being enough. A 100 W LED floodlight cannot afford to burn half its input in a resistor, and its current must stay exact as it heats. Such lights use constant-current electronic drivers — the resistor's sophisticated descendant — but the indicator LEDs on the same product still use this page's humble formula.
Quick reference: forward voltages and standard values
| LED colour | Typical Vf | Notes |
|---|---|---|
| Infrared | ≈ 1.4 V | remote controls — invisible, lowest Vf |
| Red | 1.8–2.2 V | the classic indicator |
| Orange | ≈ 2.1 V | — |
| Yellow | ≈ 2.2 V | — |
| Green | 2.2–3.2 V | old and modern types differ — check the datasheet |
| Blue | ≈ 3.2 V | needs real headroom above 3.3 V rails |
| White | ≈ 3.2 V | a blue LED with a phosphor coat |
| Ultraviolet | ≈ 3.4 V | highest common Vf |
The pattern is physics, not coincidence: a photon's energy is set by the LED's colour, and each electron must be given at least that much energy, in electron-volts, to make the light — so Vf in volts tracks the photon energy up the spectrum. The E12 values the calculator rounds to are 1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2 times each power of ten — twelve rungs per decade, spaced so their tolerance ranges tile the number line.
Multiple LEDs: series is fair, parallel is not
Series strings share one resistor happily because Kirchhoff guarantees the same current through every link — Example 6's pair can never unbalance. Parallel branches are a different story. Two LEDs wired in parallel across one resistor will have slightly different Vf values (no two are identical), and the one with the lower Vf grabs the lion's share of the current, glows brighter, warms up, drops its Vf further and grabs more — a quiet thermal runaway that ends with one overdriven LED and one dim one. The cure is trivial and absolute: one resistor per parallel LED, each calculated by this page's formula. It costs pennies and it is how every competent multi-LED product is built.
Common mistakes
- Using the full supply voltage in Ohm's law. The resistor only drops Vs − Vf, not Vs. Using the whole 9 V in Example 1 would give 450 Ω and a needlessly dim LED; using Vf alone would give 100 Ω and a fried one. The subtraction is the calculation.
- Leaving current in milliamps inside the formula. R = (Vs − Vf) ÷ If needs amps: 20 mA is 0.02. Forgetting the conversion shrinks the resistor a thousandfold — the LED's last calculation error. This calculator converts for you; hand calculations must not skip it.
- Rounding the resistor down to the nearer standard value. Below the exact value, current exceeds the target. The convention — built into this calculator — is to round up to the next E12 value and accept a touch less brightness.
- Ignoring the resistor's power rating. 0.176 W in a 0.125 W resistor is a slow scorch. Double the calculated power when choosing the part, and give high-power builds more margin still.
- One resistor for parallel LEDs. The slightly-lower-Vf LED hogs the current and ages fast (see the depth section). A resistor per LED is not pedantry; it is the difference between matched brightness and a slow-motion failure.
FAQ
Why does an LED need a resistor at all?
An LED's current rises extremely fast once the voltage passes Vf. Connected straight to a battery it would draw far too much current and burn out in seconds. The resistor limits the current to a safe value.
Why pick the E12 value above, not below, the exact answer?
A smaller resistor lets more current flow than planned. Rounding up to the next standard value keeps the current at or below your target, so the LED stays safe — just a touch dimmer.
What resistor wattage should I buy?
Choose a rating at least twice the calculated power for safety. Here 0.14 W × 2 = 0.28 W, so use a common 0.5 W part — or at minimum a 0.25 W one run within its limit.
What if my exact resistor value is not available?
Use the E12 value above it, as this calculator does, or combine two resistors: in series their values add, so 330 Ω + 22 Ω makes 352 Ω — very close to Example 1's exact 350 Ω. In parallel the combination falls below both, which the parallel resistor finder on this site can solve backwards.
Can I run an LED brighter by using a smaller resistor?
Only up to the datasheet's maximum current — beyond it, brightness gains flatten while life collapses; an LED at twice its rated current may last hours instead of the promised tens of thousands. If you need more light, use a bigger LED, not a braver resistor.
Why is my LED dim even with the right resistor?
Check the actual supply voltage (a tired 9 V battery may deliver 7 V), check polarity — LEDs only conduct one way — and check that Vf matches the colour fitted: a white LED calculated as red (2 V instead of 3.2 V) gets a resistor far too large for its real drop.
Does the resistor go before or after the LED?
It makes no electrical difference — series components share the same current in any order. Convention puts it on the positive side, but the LED neither knows nor cares.
How much current do high-brightness LEDs need?
Power LEDs run at 350 mA, 700 mA or more, and at those currents a resistor ballast wastes serious power and still regulates poorly as the LED heats. That is the territory of constant-current drivers; this calculator's method is for indicator and small lighting LEDs up to a few tens of milliamps.
What happens if the supply voltage is below Vf?
The LED simply does not light — the calculator will tell you the supply must exceed Vf. In practice the LED may glow microscopically just below Vf, but no useful light appears until the forward voltage is reached.
Why do LED strips have resistors I can see?
Each cuttable segment is a complete circuit: typically three LEDs in series (3 × 3.2 V ≈ 9.6 V) plus one resistor sized to drop the remaining ~2.4 V of the 12 V rail at the segment's design current — this page's formula, mass-produced.