CalculateItNow home

LED Resistor Calculator

Series resistor for an LED or LED string: required ohms, the nearest E12 part, the current you actually get, power dissipated and the wattage to buy.

LED Resistor Calculator: with the default inputs, required resistance (ω) is 500.

V
V
mA
LEDs
Try an example
The nearest E12 part (470 Ω) lets 21.3 mA through, above your 20 mA target. Go up to the next E12 value if the LED is near its rating.
Required resistance (Ω)
500

Ohms, per resistor. Exact value before rounding to a stock part.

Nearest E12 standard value (Ω)
470
Current with that E12 part (mA)
21.28
Power in the resistor (mW)
200
Resistor wattage to buy
1/2 W
Resistors needed
1
Total supply current (mA)
20
Total power from the supply (mW)
240
Power in the LEDs (mW)
40
Share of power reaching the LEDs
16.7%
Assumptions
  • Forward voltage is treated as constant at the current you enter; a real LED's Vf rises slightly with current and falls with temperature.
  • The supply is stiff (its voltage does not sag under load).
  • Parallel mode assumes one resistor per LED, which is the correct way to build it.
  • Wattage recommendation derates to 50% of the resistor's rating.
Current through the 470 Ω resistor as forward voltage varies
010201.41.641.882.122.362.6LED forward voltage (V)
Actual current (mA)Your target (20 mA)
Typical LED forward voltages
Colour / typeVf at 20 mAResistor from this supply
Infrared1.2–1.6 V560 Ω
Red1.8–2.2 V470 Ω
Amber / yellow2.0–2.2 V470 Ω
Green2.1–3.0 V470 Ω
Blue2.8–3.4 V470 Ω
White2.9–3.4 V470 Ω

Forward voltage is a range, not a constant — it varies part to part and drops as the LED heats. The right-hand column is the nearest E12 resistor for 1 LED(s) of that colour at 20 mA from your 12 V supply.

Math verified by automated testsUpdated 2026-09-093 sources cited

How this is worked out

The formula

Series string:   R = (Vsupply − n × Vf) ÷ I
Parallel:        R = (Vsupply − Vf) ÷ I, one resistor per LED

P_resistor = I² × R = (Vsupply − n × Vf) × I
Recommended rating = smallest standard value ≥ 2 × P (50% derating)

I is in amperes: 20 mA = 0.02 A

Open How it’s calculated above to see this worked through with your own numbers.

What you enter

Supply voltage
The voltage feeding the LED and its resistor.0 or more · defaults to 12
LED forward voltage (Vf)
From the datasheet: red/amber ≈ 1.8–2.2 V, green ≈ 2.1–3.0 V, blue/white ≈ 2.8–3.4 V.0 or more · defaults to 2
Desired LED current
20 mA is the classic indicator LED figure; modern high-efficiency parts are bright at 2–5 mA.0 or more · defaults to 20
Number of LEDs
A number.1 or more · whole numbers only · defaults to 1
Arrangement
Parallel branches each need their own resistor; sharing one is the classic mistake.Series — all LEDs in one string, one resistor · Parallel — each LED gets its own resistor

What you get back

Required resistance (Ω)main answer
Ohms, per resistor. Exact value before rounding to a stock part.
Nearest E12 standard value (Ω)
Current with that E12 part (mA)
Power in the resistor (mW)
Resistor wattage to buy
Resistors needed
Total supply current (mA)
Total power from the supply (mW)
Power in the LEDs (mW)
Share of power reaching the LEDs

What this assumes

  • Forward voltage is treated as constant at the current you enter; a real LED's Vf rises slightly with current and falls with temperature.
  • The supply is stiff (its voltage does not sag under load).
  • Parallel mode assumes one resistor per LED, which is the correct way to build it.
  • Wattage recommendation derates to 50% of the resistor's rating.

About this calculator

An LED is a diode, not a resistor: past its forward voltage the current rises almost vertically with voltage, so connecting one straight across a supply destroys it. The fix is a series resistor that eats the leftover voltage and sets the current. This works out the resistor value, the nearest part you can actually buy, the current you will really get with it, and the wattage rating you need.

The formula and why it looks like that

The supply voltage splits between the LED and the resistor. The LED takes its forward voltage Vf (roughly fixed — that is what a diode does), so the resistor gets whatever is left, and Ohm's law turns that into a resistance for your chosen current: R = (Vsupply − Vf) ÷ I. For LEDs in series all of them drop their Vf from the same supply, so subtract n × Vf; the current through the string is the same everywhere, so one resistor does the whole job. For LEDs in parallel, each branch needs its own resistor.

The parallel-LED mistake

Wiring several LEDs in parallel behind one shared resistor looks economical and fails badly. Forward voltage varies part to part, even in the same batch; the LED with the lowest Vf takes more than its share of the current, heats up, which lowers its Vf further, which takes more current still. You end up with one blazing LED, several dim ones, and eventually a dead one. Give each branch its own resistor, or drive them in series.

Headroom, and when a resistor is the wrong answer

A resistor sets current only in proportion to the voltage across the resistor. If the supply is 3.4 V and a white LED drops 3.2 V, the resistor has 0.2 V to work with — and a part whose Vf is 0.1 V lower than nominal instantly gets 50% more current. As a rule of thumb keep at least 15–20% of the supply across the resistor. Below that, or for anything above roughly 100 mA where the wasted heat matters, use a constant-current driver instead: it regulates current directly rather than inferring it from a voltage difference.

Reading the results

The exact resistance almost never matches a stock part, so the calculator gives you the nearest E12 value (the ±10% series most through-hole resistors come in) and, honestly, the current that value will actually pass. If it comes out above your target and the LED is near its rating, go one step up. The wattage output applies a 50% derating — a resistor run at its full rated power is running hot enough to discolour the board.

Vf is the number people get wrong most often. It is not 2 V for everything: blue and white LEDs sit near 3.1 V, and a "12 V LED strip" already has resistors built in and needs none of this.

Frequently asked questions

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

For a 2 V red LED at 20 mA, (12 − 2) ÷ 0.02 = 500 Ω, so a 470 Ω or 560 Ω part. For a 3.2 V white LED it is (12 − 3.2) ÷ 0.02 = 440 Ω.

What happens if the resistor is too big?

Nothing breaks — the LED just runs dimmer, because it passes less current. Going one E12 step up (470 Ω instead of 430 Ω) costs a few percent of brightness you will not see.

Can several LEDs share one resistor?

Only in series, where the same current necessarily flows through all of them. In parallel they do not share current equally and one LED ends up taking most of it, so give each branch its own resistor.

How many LEDs can I put in series?

As many as fit under the supply with headroom to spare: floor((Vsupply × 0.85) ÷ Vf). On 12 V that is five red LEDs or three white ones.

What wattage resistor should I buy?

At least twice the calculated dissipation. A 500 Ω resistor at 20 mA burns 200 mW, so a 1/4 W part is running at 80% of rating and will be hot — use 1/2 W.

Put this calculator on your own site

A working led resistor, free for any site, with no ads and no sign-up. It resizes to fit wherever you paste it and updates itself as this page improves.

Paste this anywhere. It works on any site, carries no ads, never expires, and always shows the current version.

LED Resistor Calculator by CalculateItNow

The page's own title. The clearest description of what the link leads to.

The credit line sits outside the widget on purpose, so it is a real link on your page rather than one buried in a frame. Please keep it — it is what pays for CalculateItNow staying free and ad-free. The script only resizes the widget to fit its contents; drop it and the widget still works.

Browse every calculator widget·How to add it to WordPress, Squarespace or Wix

The questions people ask next to a led resistor.

All science calculators·Browse everything