LED Resistor Calculator

Ohm's law gives you 155 ohms and the parts drawer has 150 and 180. Which one you reach for changes the LED current by a fifth, and on a low-headroom supply the forward voltage tolerance moves it further than either choice does.

The rail the string runs from
From the datasheet, at the current you want. Red is often near 2 V, blue and white near 3 V.
Per string, not per LED — a series string carries one current
How far Vf varies part to part. Used to show how much the current moves.
LED Resistor Calculator — Series Resistor Value, Standard Size and Power RatingBuildFigure

The whole calculation is one subtraction and one division

An LED is not a resistor. Above its forward voltage it conducts hard, and the current is set by whatever is in series with it rather than by the LED itself. So the series resistor takes the leftover voltage — supply minus the sum of the forward drops — and the value follows from Ohm's law at the current you want.

Supply 5 V, one red LED at 2.1 V, 20 mA wanted: 5 − 2.1 = 2.9 V across the resistor, and 2.9 / 0.020 = 145 Ω. There is no 145 Ω in E24, so you fit 150 Ω and get 19.3 mA. Round up rather than down: the larger resistor gives slightly less current than asked for, which is the safe direction. Rounding down pushes the LED past the number you chose deliberately.

The resistor dissipates the voltage it drops times the current through it: 2.9 × 0.0193, about 56 mW. Fit a quarter-watt part and it runs cool. The habit worth keeping is to size the resistor for roughly twice the calculated dissipation, because a resistor at its rated power is running hot enough to discolour a board over time.

Series strings, parallel strings, and the mistake in between

LEDs in series all carry the same current, so a string of three white LEDs at 3.2 V needs 9.6 V of the supply before the resistor gets any. From 12 V that leaves 2.4 V for the resistor, which at 20 mA is 120 Ω. Series is efficient because one resistor's loss is shared across several LEDs.

Parallel is where people get caught. Two LEDs side by side sharing a single resistor look symmetrical and are not. Forward voltage varies between parts from the same reel, and the LED with the lower Vf takes more of the current. Taking more current warms it, warming lowers its forward voltage further, and it takes more still. Sometimes it just runs brighter and dies early; sometimes it runs away. Give every parallel branch its own resistor. This calculator assumes that arrangement when you set more than one string.

Headroom is what makes the number trustworthy

The current through the string is (Vsupply − Vf_total) / R. Everything uncertain in that expression sits in the numerator. If the resistor drops 3 V and the forward voltage is 0.2 V off from what the datasheet typical says, the current shifts by about 7 percent. If the resistor only drops 0.4 V, the same 0.2 V error shifts it by half.

SupplyStringResistor dropEffect of ±0.2 V Vf error
5 V1 red at 2.1 V2.9 Vabout ±7% current
5 V1 white at 3.2 V1.8 Vabout ±11% current
5 V1 white plus 1 red-0.3 Vdoes not run at all
12 V3 white at 3.2 V2.4 Vabout ±25% current

The bottom row is the trap in efficient designs. Packing as many LEDs into the string as the supply allows minimises wasted power and maximises sensitivity to part variation at the same time. If matched brightness matters, leave headroom, or stop using a resistor and use a constant-current driver, which regulates the current directly and does not care what the forward voltage turns out to be.

What to measure once it is built

Put a meter in series with the string, or measure the voltage across the resistor and divide by its value — the second is easier because you do not have to break the circuit. If the measured current is well away from the calculation, the forward voltage you used is the suspect, not the arithmetic. Read the actual drop across the LED at that current and put the real number back into the calculation.

Related bench pages: the voltage divider calculator for the reference voltages beside it, the resistor color code calculator for identifying what is already in the drawer, and the power supply rail calculator when the LEDs are one load among several.

Questions people ask

What resistor do I need for a 5 V supply and a standard LED?

For a red or yellow LED near 2 V forward at 20 mA the arithmetic gives about 150 Ω, and for a blue, white or green LED near 3.2 V it gives about 90 Ω, so 91 or 100 Ω in E24. Those are starting values, not answers, because the forward voltage depends on the specific part and on the current you actually run. The reason 220 Ω and 330 Ω turn up in so many beginner kits is that they run the LED well under 20 mA, which is dimmer, cooler and completely fine for an indicator. Modern high-efficiency LEDs are clearly visible at 2 to 5 mA, so a larger resistor than the calculation suggests is often the better choice for a panel light.

Can I put one resistor in front of several parallel LEDs?

You can wire it and it will light, and it is still the wrong way to do it. Parallel LEDs do not share current in proportion to anything you control. The part with the lowest forward voltage takes the biggest share, and because forward voltage falls as the junction warms, that imbalance grows rather than settling. With two LEDs the result is usually visible mismatch in brightness and one part failing years earlier than the other. With several, it can concentrate most of the total current into one device. One resistor per branch costs a few cents and removes the whole problem.

Should I round the resistor up or down to the nearest standard value?

Up. A larger resistor means less current, which means slightly less brightness and more margin on both the LED and the resistor. Rounding down puts you above the current you chose, and if you chose the datasheet maximum you are now past it. The exception is when the calculated value is only a percent or two below a standard size and your target current was already conservative, in which case either neighbour is fine. The calculator shows both the next value up and the nearest value in either direction so the size of that choice is visible.

Why is my measured current lower than the calculator says?

Almost always because the real forward voltage is higher than the figure you typed. Datasheet forward voltage is quoted at a specific test current, often 20 mA, and it rises with current and falls with temperature. Blue and white LEDs vary the most, and a bin spread of 0.3 V across parts on one reel is ordinary. Other candidates are a supply that sags under load, a long thin wire run adding its own drop, and a resistor at the low end of its tolerance band. Measure the voltage across the LED itself while it is running and put that number back in.

When should I use a constant-current driver instead of a resistor?

When the current has to be right rather than approximately right, when the supply voltage moves, or when the wasted power in the resistor matters. A resistor is a fixed value fighting a variable forward voltage, so anything that changes the difference between them changes the current. Battery-powered work is the clearest case: as the pack drops from full to empty, resistor-set LED current drops with it, while a constant-current driver holds it flat until the supply runs out of headroom. For power LEDs, where a few hundred milliamps are involved and the resistor would be dissipating watts, a driver is the only sensible answer.

Related