An LED is a diode, and a diode does not obey Ohm's law. Above its turn-on point the current through it climbs almost vertically for a very small rise in voltage, which means that connecting an LED straight across a supply is not a way of running it at some particular brightness — it is a way of destroying it. The series resistor exists to convert that near-vertical curve into something you can control. The LED resistor calculator above works out what that resistor should be, what it will have to dissipate as heat, and how far the real answer drifts once you round to a value you can actually buy.
Arb Digital builds free tools that show their working rather than handing over a single confident number, and this one is a good example of why that matters. The forward voltage you type is an assumption, not a measurement, and the page below is largely about how much that assumption can move and what happens to your current when it does. A calculator that prints "150 ohms" and stops has told you almost nothing about whether your LED will survive.
What This LED Resistor Calculator Does
You supply four things: the rail voltage, the forward voltage of one LED, the forward current you want to run, and how many LEDs sit in series behind the same resistor. From those the tool computes the ideal resistance, snaps it to the nearest available value at or above ideal in the E12, E24 or E96 series, recomputes the current that value actually delivers, and works out the power the resistor must dissipate so you can pick a physical part that will not cook.
The two bars underneath the grid show how the supply voltage divides between the LED string and the resistor. That split is the most useful diagnostic on the page. When almost all the voltage sits across the LEDs, the resistor is doing very little work and the circuit is fragile: a small change in forward voltage produces a large change in current. When most of it sits across the resistor, the circuit is stable but you are burning a lot of the supply as heat. Neither extreme is wrong, but you should know which one you are in.
The calculator refuses to give an answer when the LED string needs more voltage than the supply can provide, because in that case no resistor exists that will light it. That is a real design failure and it deserves a message rather than a negative resistance.
How to Use It
- Enter the supply voltage. Use the voltage at the LED's node under load, not the nominal battery figure. A 9 V alkaline cell near end of life sits closer to 7 V, and a USB port can sag well below 5 V under load.
- Pick a colour or type a forward voltage. The dropdown loads a typical value; the field stays editable so you can enter the exact VF from your own part's datasheet, which is always the better input.
- Set the forward current. Twenty milliamps is the traditional indicator figure. Modern high-efficiency LEDs are visibly bright at 2 to 5 mA, and running them lower saves power and heat with very little perceived loss.
- Set the number of LEDs in series. Series LEDs share one current and one resistor. Parallel LEDs do not, and the section below explains why that distinction matters more than it appears to.
- Read the standard value and the actual current. Rounding up costs you a little brightness and buys you safety margin. Rounding down does the opposite, which is why this tool never does it automatically.
The Formula: How the Resistor Value Is Calculated
Kirchhoff's voltage law says the voltages around a loop must sum to zero. The supply pushes VS into the loop, the LED string drops n × VF, and whatever remains has to appear across the resistor. So the resistor sees VS − nVF, and since the resistor genuinely is ohmic, its value follows directly:
R = (VS − nVF) ÷ IF
With a 5 V supply, one blue LED at VF = 3.3 V and a target of 20 mA, that is (5 − 3.3) ÷ 0.020 = 85 ohms. The power the resistor turns into heat is the voltage across it times the current through it, P = (VS − nVF) × IF = 1.7 × 0.020 = 0.034 W, comfortably inside a standard quarter-watt part. The forward voltage figures behind the colour presets are typical values of the sort published on a real part; the Kingbright WP154A4SUREQBFZGW datasheet lists a hyper-red die at 1.9 V typical and 2.5 V maximum, with blue and green both at 3.3 V typical rising to 4.0 and 4.1 V maximum, all measured at 20 mA. Note the spread between typical and maximum on a single part number: that alone is enough to change your current substantially.
The underlying relationship between voltage, current and resistance is the ordinary one, set out clearly in the HyperPhysics treatment of Ohm's law from Georgia State University. If you want to go the other way and read a resistor you already have rather than choose a new one, our resistor color code calculator decodes the bands, and the resistance converter handles milliohms to megohms. That converter rescales one quantity between units; this page derives a resistance from a circuit, which is a different job.
Why the Forward Voltage You Assume Is the Weak Point
Everything above treats VF as a constant. It is not. It is the voltage at which a particular diode, at a particular temperature, passes a particular current, and all three qualifiers matter. The datasheet quoted earlier gives a temperature coefficient of about −1.9 mV per degree Celsius for a red die and −3.0 mV per degree for blue and green. Warm an LED by 40 degrees and a blue die's forward voltage falls by roughly 0.12 V. In the 5 V blue example above, the resistor voltage rises from 1.7 V to 1.82 V, and current rises about 7 per cent with no change in your circuit at all.
Batch variation is larger still. A part specified as 3.3 V typical and 4.0 V maximum could arrive anywhere in that window. Run it from 5 V with an 85 ohm resistor and a 4.0 V die draws (5 − 4.0) ÷ 85 = 11.8 mA, barely half your target. Run the 3.3 V die and you get 20 mA. Same reel, same resistor, nearly a factor of two in brightness. This is why designs that must match visually use a current source rather than a resistor, and why the low-headroom case is worth avoiding when you can.
The practical rule that falls out of this is to leave the resistor with a decent share of the supply. If the voltage across the resistor is at least a third of the supply, forward-voltage drift is diluted and current stays predictable. If it is a few tenths of a volt, the LED is effectively unregulated and small changes anywhere will swing the current hard.
Current Limits: Read Them as Ceilings, Not Targets
Datasheets give three separate current numbers and they are routinely confused. The DC forward current is the continuous limit — on the part cited above that is 30 mA for the red and blue dies and 25 mA for green. The peak forward current is much higher, 150 to 200 mA on the same part, but it applies only in pulses, specified there at one-tenth duty cycle with 0.1 ms pulse width. Using the peak figure for continuous drive will destroy the LED. The third limit is power dissipation, given as 75 to 120 mW depending on die, and it can bind before the current limit does if the LED is running warm or the forward voltage is at the high end.
Series, Parallel, and the Mistake Almost Everyone Makes
Series LEDs behind one resistor are well behaved. The same current flows through every device, so brightness is matched automatically and one resistor does the whole job. The cost is voltage: three red LEDs at 2.0 V need 6 V before the resistor even starts, so a 5 V rail cannot drive them at all and the calculator will tell you so.
Parallel LEDs behind one shared resistor are the classic error. The resistor sets the total current, but nothing distributes it evenly. The LED with the lowest forward voltage — and there is always one — takes more than its share, warms up, drops its forward voltage further because of that negative temperature coefficient, and takes more current still. This is thermal runaway on a small scale, and the usual outcome is one very bright LED and several dim ones, or eventually one dead LED and a step change in the rest. The fix is one resistor per branch. Set the number of LEDs in series to 1, compute a resistor for a single branch, and repeat it in each branch.
Mixed arrangements follow the same logic: series within a branch is fine, parallel branches each need their own resistor. When you are laying out several branches from one supply, our resistor combination calculator is useful for checking what a network of values actually presents, and the voltage divider calculator covers the related but distinct case of setting a voltage rather than a current.
Where the Energy Goes, and When a Resistor Is the Wrong Answer
A series resistor is a deliberately wasteful device. In the 12 V, three-red-LED preset, the string takes 6 V and the resistor takes the other 6 V, so half the input energy becomes heat in a component whose only job is to throw it away. For an indicator drawing 20 mA that waste is 0.12 W and nobody cares. For a lighting product drawing 350 mA from 12 V it is 2.1 W of pure loss, which is both an efficiency problem and a heat problem.
Above roughly a hundred milliamps, or wherever the resistor's dissipation becomes awkward, the right answer is a constant-current driver rather than a resistor. A switching driver holds current steady regardless of forward voltage drift and wastes a fraction of what a resistor does. The resistor keeps its place for indicators, panel lights, opto-isolator inputs and anything else where simplicity beats efficiency. If you want to see what the waste costs over time, the electricity bill calculator turns continuous watts into a running cost, and the power converter handles unit changes between watts, milliwatts and horsepower.
Choosing the Physical Resistor
The calculator suggests a power rating using a two-times margin on the computed dissipation, rounded up to the nearest common size — an eighth, a quarter, a half, one, two or five watts. Running a resistor at its rated power is legal but hot; the rating is typically defined at a stated ambient with free air around the part, and a resistor buried between other components on a crowded board will not see those conditions. Doubling the rating costs pennies and keeps the part cool enough to be reliable and cool enough to touch.
Arb Digital builds free tools like this one because useful pages earn attention. If you want tools, calculators or content built for your own audience, we can help.
Browse All Free Tools Talk to Arb DigitalCommon Mistakes to Avoid
- Putting LEDs in parallel behind one resistor — current divides by forward voltage, not equally, and the lowest-voltage device takes the largest share and gets worse as it warms.
- Using the peak forward current as a continuous rating — the peak figure applies to short pulses at low duty cycle. Continuous operation at that level destroys the part.
- Treating forward voltage as a fixed constant — it moves with current, temperature and batch. The gap between typical and maximum on one part number can nearly halve your current.
- Leaving almost no voltage across the resistor — a circuit where the LED takes 95 per cent of the supply has effectively no current regulation and will behave unpredictably.
- Sizing the resistor's power rating exactly at its dissipation — ratings assume free air at a stated ambient. Allow at least double, and more if airflow is poor.
Related Free Tools From Arb Digital
Read an existing resistor's value with the resistor color code calculator, or work out what a network of them presents using the resistor combination calculator. For setting a voltage rather than a current, use the voltage divider calculator, and for cable losses on longer runs the voltage drop calculator and wire size calculator. General electrical relationships are covered by the Ohm's law calculator. The full free online tools hub lists everything.
Frequently Asked Questions
It depends entirely on the LED's forward voltage. A red LED at 2.0 V drawing 20 mA needs (5 minus 2.0) divided by 0.020, which is 150 ohms. A blue LED at 3.3 V needs 85 ohms for the same current. There is no single correct answer for 5 V, which is why the forward voltage field exists.
You should not. The resistor fixes the total current but nothing shares it evenly between branches. The LED with the lowest forward voltage takes the largest share, warms up, drops its forward voltage further and takes more still. Use one resistor per parallel branch instead.
Roughly 2.0 V for red, amber and yellow, and roughly 3.2 to 3.3 V for green, blue and white, all at 20 mA. Treat these as starting points. Manufacturer datasheets show maximums as much as 0.8 V above typical on the same part, so measure or look up your actual component before committing.
Dissipation is the voltage across the resistor times the current through it. Most indicator circuits produce well under a tenth of a watt, so a quarter-watt part is ample. Pick a rating of at least twice the calculated dissipation, because published ratings assume free air at a stated ambient temperature.
Rounding up gives slightly less current than your target, which is the safe direction. Rounding down gives more current than you asked for, and on a part already close to its limit that is a change the calculator should not make on your behalf without saying so.
Only with a supply that limits current by itself, such as a constant-current driver. Connecting an LED directly across a voltage source relies on the source's internal resistance to limit current, which is neither specified nor stable, and usually ends with a destroyed LED.
Once current rises past roughly a hundred milliamps, or when the resistor's own dissipation becomes significant, or when brightness must match across many units. A driver holds current steady despite forward-voltage drift and wastes far less energy than a resistor doing the same job.
This tool is provided for educational and design-estimation purposes. Component ratings, thermal behaviour and safety requirements vary by part and application, and nothing here replaces the manufacturer's datasheet or a qualified electrical assessment of your circuit.