Every LED needs a resistor to keep it from burning out. Set the supply voltage, the LED's forward voltage and forward current, and how many LEDs in series or parallel, and this calculator gives the current-limiting resistor from R = (Vsupply − Vf) / If. It rounds to the nearest standard value, works out the power the resistor must shed and a safe wattage rating, and shows the total current — with a live circuit and a warning if the supply is too low. It all runs on your device.
You are in the Physics lab.
What the resistor value, the standard value and the power rating tell you.
The tool first gives the exact resistance the maths demands, then the nearest standard value from the common E12 series — rounded up, so the real current lands at or a touch below your target rather than over it. Fit the standard value; a few percent below the target current is invisible to the eye and safe for the LED.
The resistor turns the voltage it drops into heat: P = (Vsupply − Vf) · If. A quarter-watt resistor is fine for a single indicator LED, but a big voltage drop or a fat current can exceed it. The suggested rating picks the next standard wattage with headroom so the part runs cool — undersizing it is a common cause of scorched resistors.
In series one resistor sets the current for the whole string, so long as the supply beats the sum of the forward voltages. In parallel each LED gets its own resistor and the total current multiplies. If you ask for more LED voltage than the supply can give, the circuit greys out and warns you — you need a higher supply or fewer LEDs in series.
Ohm's law applied to the leftover voltage.
Subtract the LED's forward voltage from the supply to get the voltage the resistor must drop, then divide by the target forward current. A 12 V supply, a 2 V LED and 20 mA gives (12 − 2) / 0.02 = 500 Ω. That is Ohm's law solved for R — nothing more exotic.
Stack LEDs in series and their forward voltages add, so the resistor drops Vsupply − n·Vf. The same current threads all of them, which is why one resistor does for the whole string. You can only stack as many as the supply's spare voltage allows — three 3.2 V white LEDs already need 9.6 V before the resistor even starts.
Put LEDs in parallel and each sees the full supply, so each needs its own resistor sized as if it were alone — sharing one resistor lets the LED with the lowest forward voltage steal the current and outshine (then outlive) the rest. The total current is then the sum of the branches. Our Ohm's law calculator explores that resistor on its own.
Teaching electronics? You can embed this calculator on your own site free — one line of code, no sign-up.
Put the LED Resistor Calculator on your own page — free, no sign-up, no watermark. It runs entirely in your visitors' browsers. Copy the snippet and paste it into your page's HTML.