Electronics calculator

Free LED resistor calculator

Size the series current-limiting resistor that runs any LED safely from your supply — enter the supply voltage, the LED's forward voltage, and the current, and the resistor value plus its wattage are updated live, as you type.

InputsLive
Supply voltage (Vs)
V
LED forward voltage (Vf)
V
Forward current (If)
mA
Result
Required resistance
150 Ω
Standard: 150 Ω · Power: 60 mW
Exact resistance150 Ω
Standard E12 value150 Ω
Power dissipation60 mW
Voltage drop3 V

Use a resistor rated well above the calculated power dissipation. Never connect an LED directly to a power supply without current limiting.

Results are estimates. Consult a professional.

What it does

Why an LED needs a series current-limiting resistor

An LED resistor calculator finds the series resistor that lets you run a light-emitting diode safely from a given supply. An LED is a current-driven part, not a voltage-driven one: once the voltage across it passes its forward voltage, the current shoots up almost vertically for the tiniest extra volt. Wire an LED straight across a battery with no resistor and that runaway current cooks the junction in a fraction of a second — the LED flares bright, then dies.

A resistor placed in series fixes this. It soaks up the voltage left over after the LED takes its share, and because a resistor's current rises smoothly with voltage, it sets a steady, predictable current through the LED. The resistor is the cheap, reliable referee between a stiff supply and a fragile diode.

Current, not voltage
You do not set an LED's brightness by choosing a voltage — you set its current. The resistor is what converts "I have 5 volts" into "the LED gets exactly 20 milliamps."
How it's calculated

How the LED resistor calculator works

The calculation is a single application of Ohm's law to the resistor alone. The resistor has to drop whatever voltage the LED does not, while passing the current you want through the LED. Divide that leftover voltage by the target current and you have the resistance.

R = (V_supply V_forward) / I_forward
P_R = (V_supply V_forward) × I_forward = I_forward² × R

The two power forms are the same number written differently: since R = (V_supply − V_forward)/I, multiplying by I² gives I²R = (V_supply − V_forward) × I. This is exactly Ohm's law applied across the resistor, so the LED resistor calculator is really an Ohm's-law solver pointed at the part of the circuit you can control.

This is standard LED datasheet practice; the underlying relation is Ohm's law (V = IR) applied to the series resistor. See Ohm's law and series-circuit theory in Wikipedia's "Ohm's law" and "LED circuit" articles.
The inputs

The three inputs the calculator needs

Three numbers fully determine the resistor. Two come from your circuit and one comes from the LED's datasheet.

Supply voltage (V_supply)

The voltage feeding the LED branch — a 5 V USB rail, a 9 V battery, a 12 V vehicle line, or a 3.3 V microcontroller pin. It must be larger than the LED's forward voltage, otherwise the LED never lights and the calculator cannot return a value.

Forward voltage (V_forward)

The voltage the LED itself drops once it is conducting. This depends mostly on colour, because colour is tied to the semiconductor chemistry: red LEDs sit near 2 V, while blue and white LEDs sit near 3.2 V. Read it from the datasheet where possible; the table further down gives typical ranges when you cannot.

Forward current (I_forward)

The current you want flowing through the LED, in milliamps. 20 mA is the long-standing default for ordinary 5 mm indicator LEDs and is what most datasheets rate brightness at. Running below the rating (say 5–10 mA) is perfectly fine and just gives a dimmer, cooler, longer-lived LED; running above the rating risks early failure.

Example

A worked example: a red LED on 5 volts

Example: a standard red LED from a 5 V USB supply

Sam wants to add a power indicator to a 5 V USB project. The LED is an ordinary red 5 mm part with a forward voltage of 2 V, and the datasheet rates it at 20 mA. What series resistor keeps it safe?

Step 1 — Find the leftover voltage

The resistor must drop whatever the LED does not: V_supply − V_forward = 5 − 2 = 3 V.

Step 2 — Divide by the target current

Convert 20 mA to amps (0.02 A), then R = 3 ÷ 0.02 = 150 Ω. That is the exact resistance the calculator reports.

Step 3 — Pick a standard value

150 Ω is itself a standard E12 value, so you can buy it directly. If 150 Ω is not in your parts drawer, round up to the next standard value — 220 Ω — which lowers the current slightly to about 13.6 mA. Rounding up is always the safe direction: a bigger resistor means less current, never more.

Step 4 — Check the resistor's wattage

The power the resistor must shed is P = (5 − 2) × 0.02 = 0.06 W, or 60 mW. A common 1/4-watt (0.25 W) resistor handles that with a four-fold margin, so any garden-variety resistor works here.

150 Ω · 60 mW
A 150 Ω resistor (or 220 Ω if you want margin) at 1/4 W safely runs a 2 V red LED at 20 mA from 5 V. Swap to a 3.2 V blue or white LED on the same 5 V and the resistor drops to 90 Ω — round up to 100 Ω.
Quick reference

Typical LED forward voltages and currents

Forward voltage tracks LED colour, and current is usually 20 mA for standard indicators. Use these typical values when you do not have a datasheet, but treat the datasheet as the final word — forward voltage varies between manufacturers and rises a little at higher current.

LED colourTypical V_forwardTypical current
Infrared1.2–1.6 V20–100 mA
Red1.8–2.2 V20 mA
Orange / yellow2.0–2.2 V20 mA
Green (standard)2.0–2.4 V20 mA
Green / blue (high-brightness)3.0–3.4 V20 mA
Blue / white3.0–3.4 V20 mA
Ultraviolet3.4–4.0 V20 mA

Typical 5 mm indicator-LED values; always confirm V_forward and the maximum current against the datasheet for your specific part.

Worked through the formula for a 20 mA LED, these give the resistor you need at common supplies. The "round-up" column is the next standard E12 value at or above the exact figure — read off the bands with a resistor colour code chart.

SupplyLED (V_forward)Exact RRound up to
5 VRed (2.0 V)150 Ω150 Ω
5 VBlue/white (3.2 V)90 Ω100 Ω
9 VRed (2.0 V)350 Ω390 Ω
12 VRed (2.0 V)500 Ω560 Ω
12 VBlue/white (3.2 V)440 Ω470 Ω
3.3 VRed (1.8 V)150 Ω150 Ω

All rows assume 20 mA. Exact R = (V_supply − V_forward) / 0.02; the round-up column is the nearest E12 standard value at or above it.

Wattage

Choosing the resistor's power rating

Resistance is only half the choice — the resistor must also survive the heat it makes. The power is P = (V_supply − V_forward) × I_forward, and you buy a resistor rated comfortably above it. Standard through-hole resistors come as 1/8 W (0.125 W), 1/4 W (0.25 W), 1/2 W and 1 W. A good rule is to pick a rating at least twice the calculated power so the part runs cool.

  • Low-voltage indicators (5 V, 20 mA): the resistor sheds 60 mW or so — any 1/4 W resistor is fine.
  • 12 V at 20 mA: the drop is larger, so the resistor handles 0.2 W. A 1/4 W part is marginal at full load; a 1/2 W resistor is the comfortable choice.
  • High-current or automotive use: once power passes ~0.25 W, step up to a 1/2 W or 1 W resistor, and remember it will get noticeably warm.
Higher supply, hotter resistor
Running the same LED from 12 V instead of 5 V wastes far more energy as heat in the resistor, because it has to drop ten volts instead of three. Where efficiency matters, a constant-current driver beats a resistor — but for a single indicator LED, the resistor's simplicity wins.
Multiple LEDs

Driving several LEDs: series vs parallel

Lighting more than one LED changes the arithmetic, and the series-versus-parallel choice matters more than beginners expect.

LEDs in series — one resistor, voltages add

Stack LEDs end to end and their forward voltages add up, so a single resistor sets the current for the whole string. Three red LEDs (3 × 2 V = 6 V) on a 12 V supply at 20 mA need R = (12 − 6) ÷ 0.02 = 300 Ω (round up to 330 Ω). This is the efficient layout — one resistor, less wasted voltage — but the supply must exceed the combined forward voltage.

LEDs in parallel — one resistor each

Do not put several LEDs in parallel behind one shared resistor. Real LEDs differ slightly in forward voltage, so the one with the lowest V_forward hogs most of the current and runs hot while the others stay dim — a problem called current hogging. Give each parallel LED its own series resistor so each branch is limited independently.

Series saves, parallel is safe per-leg
Series is most efficient when the supply is high enough; parallel-with-its-own-resistor is the robust default when forward voltages or colours differ. Mixing colours in series is fine — just add their forward voltages.
Pitfalls

Common LED resistor mistakes

  • No resistor at all. "It's only an LED" is how LEDs die. Even a 3 V coin cell can over-drive a 2 V red LED; the internal resistance of the cell is the only thing saving it, and that is not a design.
  • Rounding the resistor down. Always round up to the next standard value. A smaller resistor pushes more current and shortens LED life; a slightly larger one only dims the LED a touch.
  • Using supply voltage as the drop. The resistor drops V_supply − V_forward, not the full supply. Forgetting to subtract V_forward sizes the resistor too high — harmless but dim — or, if you also mis-handle it, too low.
  • Ignoring the wattage. A correctly-valued resistor can still burn out if it is under-rated for power. Check P, especially on 12 V and higher rails.
  • Sharing one resistor across parallel LEDs. Current hogging makes the brightness uneven and can overload one LED. One resistor per parallel branch.
Accuracy

How accurate is this LED resistor calculator

The arithmetic is exact: for the supply voltage, forward voltage, and current you enter, R = (V_supply − V_forward) / I_forward and P = (V_supply − V_forward) × I_forward are computed to full floating-point precision. The result is the ideal resistor; real circuits then land close to it rather than exactly on it, for physical reasons.

  • Resistor tolerance. Stock resistors are typically ±1% (E96) or ±5% (E12/E24), so the real current sits a few percent either side of target. LEDs tolerate this easily.
  • Forward-voltage spread. The biggest uncertainty is V_forward itself — it varies between parts and rises slightly with current and falls with temperature. A 0.2 V error here moves the resistor value more than the resistor's own tolerance does.
  • Rounding to standard values. Because you round up to the nearest stock resistor, the built current is usually a little below the target — which is the safe direction.

For an indicator LED none of this matters; 20 mA versus 17 mA is invisible to the eye. Treat the calculated resistor as the design value, round up to a standard part, and confirm the wattage. For the underlying theory, see Ohm's law and the Wikipedia "LED circuit" reference linked above.

Questions

Frequently asked questions about the free LED resistor calculator

A LED resistor calculator is a free online tool that helps you calculate the series resistor needed to safely drive an LED at its rated current. LEDs are current-driven devices — they need a resistor in series to limit current to the rated value. It runs entirely in your browser with instant results and no sign-up.
Red 1.8-2.2 V; orange/yellow 2.0-2.2 V; green 2.0-3.5 V; blue/white 3.0-3.5 V; UV 3.5-4.0 V. Check the datasheet for your specific LED.
LEDs have a steep V-I curve — voltage barely changes as current rises. A series resistor adds a controlled voltage drop that absorbs supply variation and keeps I steady.
Multiple LEDs in series share one resistor (more efficient). Parallel LEDs need one resistor each because their V_f varies enough to cause current hogging.
About

About this LED resistor calculator

This LED resistor calculator runs entirely in your browser — nothing is sent to a server. Enter your supply voltage, the LED's forward voltage, and the target forward current in milliamps, and it applies Ohm's law to the series resistor — R = (V_supply − V_forward) / I_forward — to return the exact resistance, the power the resistor dissipates, and a suggested standard value, recalculating instantly as you type.

Want a calculator built for your business?

Customize any of our 400+ tools to match your brand, or commission a new one tailored to how your business actually calculates — pricing, payroll, quotes, anything. Deployed on your domain, math runs in your visitors' browsers.