LED Resistor Calculator
- Kirchhoff: the resistor must drop what the LEDs don't. 9 V supply − 1 × 2 V forward drop = 7 V across the resistor.
- Ohm's law at the target 20 mA: R = 7 V ÷ 0.02 A = 350 Ω.
- Resistors come in standard values: rounding up to the next E12 value gives 390 Ω, which runs the LED slightly gently at 7 ÷ 390 = 17.95 mA.
- The resistor turns 125.6 mW into heat, so with the usual two-times safety margin you want at least a 0.5 W part.
This LED resistor calculator finds the correct current-limiting resistor for one LED or a string of LEDs in series. You enter your supply voltage, the forward voltage of each LED, the number of LEDs in series, and your target current. The tool applies Ohm's law — R = (supply voltage - total LED forward voltage) / target current in amps — to produce the exact resistance, then snaps it to the nearest E12 preferred value sold in stores (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade). It also calculates the real current the chosen value delivers and the power it dissipates, so you can pick a wattage rating with the standard safety margin.
Ohm's law is the accepted method for sizing LED resistors because it directly relates voltage, current, and resistance in a single step. Real-world parts are sold only in E12 steps, so rounding up to the next value protects the LED at a small cost in brightness. This page shows the formula, step-by-step workings, and verified worked examples — including a 2.0 V red LED at 20 mA on 9 V needing 350 ohms (390 ohms nearest, 17.95 mA, 125.6 mW, so use 0.5 W), three 3.2 V white LEDs in series on 12 V (120 ohms exact, 48.0 mW), and a 1.8 V infrared LED at 15 mA on 5 V (220 ohms, 14.55 mA, 46.5 mW) — along with sources.
Worked examples
The classic 9 V battery build
Primary result: 350 Ω calculated — a 390 Ω E12 part runs the LED at 17.95 mA. (9 V · 2 V · 20 mA · 1 LEDs)
| Calculated resistance | 350 Ω |
| Nearest E12 value (rounded up) | 390 Ω |
| Actual LED current with that value | 17.95 mA |
| Power dissipated in the resistor | 125.6 mW |
| Recommended resistor rating (2× headroom) | 0.5 W |
A series string of white LEDs
Primary result: 120 Ω — the three forward drops leave just 2.4 V for the resistor. (12 V · 3.2 V · 20 mA · 3 LEDs)
| Calculated resistance | 120 Ω |
| Nearest E12 value (rounded up) | 120 Ω |
| Actual LED current with that value | 20.00 mA |
| Power dissipated in the resistor | 48.0 mW |
| Recommended resistor rating (2× headroom) | 0.125 W |
A gentle 15 mA infrared LED
Primary result: 213.33 Ω — rounded up to 220 Ω, dissipating 46.5 mW. (5 V · 1.8 V · 15 mA · 1 LEDs)
| Calculated resistance | 213.3333 Ω |
| Nearest E12 value (rounded up) | 220 Ω |
| Actual LED current with that value | 14.55 mA |
| Power dissipated in the resistor | 46.5 mW |
| Recommended resistor rating (2× headroom) | 0.125 W |
How the LED resistor is calculated
Ohm's law sizes the resistor: R = (supply voltage - total LED forward voltage) / target current in amps. The formula subtracts the voltage the LED drops from your supply, then divides what remains by the current you want to push through the circuit. That quotient is the exact resistance in ohms. Any LED resistor calculator applies this same relationship, so understanding the steps helps you check the result and pick the right part.
Take the verified case of a 2.0 V red LED running at 20 mA on a 9 V supply. First, convert 20 mA to amps: 0.020 A. Subtract the LED's forward voltage from the supply: 9 V minus 2.0 V leaves 7.0 V for the resistor. Divide that 7.0 V by 0.020 A and you get 350 ohms exactly. Resistors are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade), and 350 ohms is not one of them. The nearest E12 value up is 390 ohms, which runs the LED at 17.95 mA and dissipates 125.6 mW. Rounding up protects the LED at a small brightness cost.
The same method works for LEDs in series. Verified: three 3.2 V white LEDs in series on 12 V leave 2.4 V for the resistor. Divide 2.4 V by 0.020 A and you get 120 ohms exactly, which happens to be an E12 value, dissipating 48.0 mW. And a 1.8 V infrared LED at 15 mA on 5 V needs 213.33 ohms; the nearest E12 value up, 220 ohms, runs it at 14.55 mA and dissipates 46.5 mW. In each case the math is the same: subtract the forward drops, divide by current, then step up to the next standard value.
Power rating matters as much as resistance. Buy a resistor rated at least twice the power it will dissipate; this 2x rule keeps the part cool and extends its life. The common 0.25 W part is not enough for the 125.6 mW case once the 2x rule is applied, because 0.25 W is only 250 mW and you need at least 251.2 mW of headroom. A 0.5 W part gives the standard safety margin instead. For the 48.0 mW and 46.5 mW cases, though, a 0.25 W resistor clears the 2x threshold with room to spare.
Worked examples
The fastest way to see how an LED resistor calculator works is to follow three verified builds from start to finish. Ohm's law sizes the resistor in every case: R = (supply voltage - total LED forward voltage) / target current in amps. Once you have that exact value, you pick the nearest E12 preferred value that rounds up, then check the actual current and power dissipation. Resistors are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade); rounding up protects the LED at a small brightness cost.
The first build is a single 2.0 V red LED running at 20 mA on a 9 V supply. The math gives 350 ohms exactly. The nearest E12 value up is 390 ohms, which drops the actual current to 17.95 mA and dissipates 125.6 mW. Here the standard safety rule matters: buy a resistor rated at least twice the power it will dissipate. The common 0.25 W part is not enough for the 125.6 mW case once the 2x rule is applied, so a 0.5 W part gives the standard safety margin.
The second build strings three 3.2 V white LEDs in series on a 12 V supply. That leaves 2.4 V for the resistor, and at a 20 mA target the math lands on 120 ohms exactly. Because 120 ohms is itself an E12 value, no rounding is needed. The resistor dissipates 48.0 mW, so a standard 0.25 W part handles it with room to spare.
The third build is a 1.8 V infrared LED at 15 mA on a 5 V supply. The exact resistor is 213.33 ohms, and the nearest E12 value up is 220 ohms. That runs the LED at 14.55 mA and dissipates 46.5 mW, again well within a 0.25 W part's rating with the 2x margin applied. The table below collects all three cases so you can compare the exact, E12, current, and dissipation figures side by side.
| Build | Exact resistor | E12 choice | Actual current | Dissipation |
|---|---|---|---|---|
| 2.0 V red LED, 20 mA, 9 V supply | 350 ohms | 390 ohms | 17.95 mA | 125.6 mW |
| Three 3.2 V white LEDs in series, 12 V supply | 120 ohms | 120 ohms | 20 mA | 48.0 mW |
| 1.8 V infrared LED, 15 mA, 5 V supply | 213.33 ohms | 220 ohms | 14.55 mA | 46.5 mW |
Forward voltage by LED colour
A common rule of thumb is that red LEDs drop around 2 V, white and blue LEDs drop around 3.2 V, and infrared LEDs sit near 1.8 V. These figures are useful starting points, but every LED has a forward voltage range that depends on manufacturing tolerance, current, and temperature. The datasheet for your specific part gives the real range, and that range matters more than any colour rule. When you enter values into an LED resistor calculator, using the datasheet's maximum forward voltage is the safe choice — it ensures the resistor limits current properly even if your LED sits at the high end of its range.
Ohm's law sizes the resistor: R = (supply voltage - total LED forward voltage) / target current in amps. A 2.0 V red LED at 20 mA on a 9 V supply needs 350 ohms. The nearest E12 value up is 390 ohms, which runs it at 17.95 mA and dissipates 125.6 mW. A 0.5 W part gives the standard safety margin here, because buying a resistor rated at least twice the power it will dissipate means the common 0.25 W part is not enough for this case once the 2x rule is applied.
White and blue LEDs behave similarly but at a higher drop. Three 3.2 V white LEDs in series on 12 V leave 2.4 V for the resistor: 120 ohms exactly, an E12 value, dissipating 48.0 mW. That tidy result is convenient, but it depends on each LED actually sitting at 3.2 V. If the datasheet allows 3.4 V, the three LEDs together drop 10.2 V and leave only 1.8 V across the resistor — the same 120 ohms would push current above the intended target.
Infrared LEDs run at the lowest forward voltage. A 1.8 V infrared LED at 15 mA on 5 V needs 213.33 ohms; the nearest E12 value up is 220 ohms, which runs it at 14.55 mA and dissipates 46.5 mW. Resistors are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade); rounding up protects the LED at a small brightness cost. Always check the datasheet rather than relying on the colour shortcut.
Why we round up to E12
Resistors are not made in every possible value. They are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade), which means you will not find an exact 350-ohm part on the shelf. Ohm's law sizes the resistor: R = (supply voltage - total LED forward voltage) / target current in amps. When the math gives you a number that is not an E12 value, an LED resistor calculator will point you to the nearest standard value above it. Rounding up protects the LED at a small brightness cost.
Consider a 2.0 V red LED running at 20 mA on a 9 V supply. The formula gives 350 ohms, but 350 ohms is not an E12 value. The nearest E12 value up is 390 ohms, which runs the LED at 17.95 mA instead of the full 20 mA. That drop of about 2 mA is barely visible to the eye, but it gives the LED a safety cushion. The resistor dissipates 125.6 mW at this current, which brings up the second reason standard values matter: power ratings. Buy a resistor rated at least twice the power it will dissipate. The common 0.25 W part is not enough for the 125.6 mW case once the 2x rule is applied, so a 0.5 W part gives the standard safety margin.
The same logic applies across other LED colors and supply voltages. A 1.8 V infrared LED at 15 mA on 5 V needs 213.33 ohms. The nearest E12 value up is 220 ohms, which runs the LED at 14.55 mA and dissipates 46.5 mW. Again, the current is slightly lower than the target, and again, the LED is safer for it. Sometimes the math lands exactly on a standard value. Three 3.2 V white LEDs in series on 12 V leave 2.4 V for the resistor, and at 20 mA that works out to 120 ohms exactly, an E12 value, dissipating 48.0 mW. In that case, no rounding is needed.
The E12 series exists because manufacturing every resistor value would be costly and unnecessary. The 12 values per decade cover the full range by multiplying or dividing by 10, so 39 becomes 390, then 3,900, and so on. When you use an LED resistor calculator and it suggests a value you do not recognize, check whether it is the next E12 value above your exact result. That is the value to buy.
- E12 values per decade: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82
- Always round up, never down, to protect the LED
- Pick a power rating at least twice the calculated dissipation
Resistor wattage and the 2x rule
Ohm's law sizes the resistor: R = (supply voltage - total LED forward voltage) / target current in amps. Once you have that resistance, you also need to check the power rating. Power = voltage across the resistor x current, and the number matters because a resistor that runs too hot will drift, age, or burn out. A good LED resistor calculator will compute both the resistance and the wattage so you can pick a part that stays cool under load.
The verified examples show why wattage is not an afterthought. A 2.0 V red LED at 20 mA on 9 V needs 350 ohms; the nearest E12 value up is 390 ohms, which runs it at 17.95 mA and dissipates 125.6 mW. That is well under 0.25 W, so it looks safe for a common quarter-watt part. It is not, once you apply the standard safety margin below. By contrast, three 3.2 V white LEDs in series on 12 V leave 2.4 V for the resistor: 120 ohms exactly, an E12 value, dissipating 48.0 mW. That case is fine at 0.125 W. A 1.8 V infrared LED at 15 mA on 5 V needs 213.33 ohms; 220 ohms runs 14.55 mA and 46.5 mW, again comfortable for a small part.
Resistors are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade); rounding up protects the LED at a small brightness cost. The same logic applies to power ratings. Buy a resistor rated at least twice the power it will dissipate; the common 0.25 W part is not enough for the 125.6 mW case once the 2x rule is applied. Twice 125.6 mW is 251.2 mW, which already exceeds 0.25 W, so a 0.5 W part gives the standard safety margin. The 48.0 mW case, doubled to 96.0 mW, stays well within a 0.125 W rating.
The 2x rule exists for good reason. Resistors are rated for free air at room temperature, but real circuits run warmer and have less airflow. Running a part near its limit also raises its surface temperature and shortens its life. Doubling the rating keeps the part cool and gives you room for supply voltage variation or current spikes. When you choose parts, always check the dissipation first, then step up to the next standard wattage that gives you the two-times margin.
Series strings and parallel pitfalls
When you wire LEDs in series, their forward voltages add together, and a single resistor can safely limit current for the entire string. Ohm's law sizes that resistor: R = (supply voltage - total LED forward voltage) / target current in amps. An LED resistor calculator applies this directly. For example, three 3.2 V white LEDs in series on a 12 V supply leave 2.4 V for the resistor. At a 20 mA target, that works out to 120 ohms exactly, which is an E12 preferred value, dissipating 48.0 mW. One resistor, placed anywhere in the series loop, does the job for all three LEDs.
Resistors are sold in E12 preferred values (10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68, 82 per decade). Because you cannot always buy the exact calculated value, rounding up to the next E12 value protects the LED at a small brightness cost. A 2.0 V red LED running at 20 mA on a 9 V supply needs 350 ohms. The nearest E12 value up is 390 ohms, which runs it at 17.95 mA and dissipates 125.6 mW. Buy a resistor rated at least twice the power it will dissipate, so a 0.5 W part gives the standard safety margin here. The common 0.25 W part is not enough for the 125.6 mW case once the 2x rule is applied.
Parallel LEDs must never share a single resistor, and this is the most common wiring mistake the calculator is meant to catch. No two LEDs have exactly the same forward voltage, even from the same production batch. When you tie them in parallel through one resistor, the LED with the lowest forward voltage hogs most of the current, overheats, and fails, which then pushes excess current through the remaining LEDs in a cascading chain reaction.
The correct approach is to give each parallel LED its own dedicated resistor sized for that specific LED's forward voltage. A 1.8 V infrared LED at 15 mA on 5 V needs 213.33 ohms; stepping up to the 220 ohm E12 value runs it at 14.55 mA and 46.5 mW. If you need several infrared LEDs on the same 5 V supply, each one gets its own 220 ohm resistor. This keeps current balanced and prevents one part from dragging the others down with it.
- One resistor per series string is correct and efficient
- One resistor per parallel LED is mandatory, not optional
- Never wire LEDs in parallel behind a single shared resistor
FAQs
What resistor do I need for an LED on 9 V?
For a 2.0 V LED at 20 mA, the calculation is (9 - 2) / 0.020 = 350 ohms. Since that exact value is not a standard part, fit a 390-ohm E12 resistor. This slightly higher value keeps the LED safe while remaining well within its operating range.
Why can't I connect an LED directly to a battery?
An LED's current rises explosively with voltage. Without a resistor to limit the flow, the LED draws destructive current almost immediately. This can burn out the LED instantly or damage the battery. A series resistor keeps the current at a safe, controlled level the LED can handle.
What if the exact resistor value doesn't exist?
Use the next E12 value up — 220 ohms for the calculated 213.33. Choosing a slightly higher resistance means the LED runs slightly dimmer and safer. The small difference in brightness is usually unnoticeable, and the extra resistance protects the LED from drawing too much current.
What wattage resistor do I need?
Pick a resistor rated for at least twice the dissipation. For example, 125.6 mW of heat calls for a 0.5 W resistor, not the common 0.25 W. This safety margin prevents the resistor from overheating and ensures long-term reliability in your circuit.
How do I wire several LEDs in series?
Add their forward voltages first: three 3.2 V whites drop 9.6 V, leaving 2.4 V across a 120-ohm resistor on 12 V. Make sure the total forward voltage stays below your supply voltage, or the LEDs will not light. One resistor limits current for the entire series chain.
Does the resistor go before or after the LED?
Either — it is a series circuit, so position does not matter electrically. The same current flows through both components regardless of order. Convention puts it on the positive side, but placing it on the negative side works just as well for protecting the LED.