LED Calculator

Find the correct current-limiting resistor for an LED circuit from the supply voltage, LED forward voltage, and forward current, using Ohm's law.

Results

Calculated
Resistor value
—
R = (Vs − n×Vf) ÷ If
Power dissipation
—
P = (Vs − n×Vf) × If
Recommended power rating
—
Standard rating at ≥2× dissipation
Nearest standard resistor
—
Closest E12 value at or above R

How the LED resistor calculation works

An LED is a diode: once it starts conducting, its own voltage stays close to a fixed value (its forward voltage, Vf) no matter how much current flows, so it can never be wired straight across a supply — it would draw more and more current until it burned out. A series resistor fixes this by absorbing the leftover voltage and setting the current to a safe, known value using Ohm's law.

The formula

For a supply voltage Vs driving n identical LEDs wired in series, each with forward voltage Vf and a target forward current If, the required series resistor is:

R = (Vs − n × Vf) ÷ If

The resistor has to drop whatever voltage is left over after the LEDs (Vs − n×Vf), and dividing that leftover voltage by the desired current gives the resistance needed to hold the current at If. The power the resistor must dissipate as heat is P = (Vs − n × Vf) × If, the same as I²R.

Choosing a power rating

Resistors are rated for how much heat they can safely dissipate, and running one near its limit shortens its life and can drift its resistance over time. A common rule of thumb is to pick a standard wattage rating at least twice the calculated dissipation, then choose a standard resistor value at or above the exact calculated resistance — rounding up keeps the current at or under the target instead of over it.

Interpreting the results

The first two result cards show the exact resistor value and the power it must dissipate. The last two round those numbers to parts you can actually buy: the closest standard E12-series resistor value and a standard resistor wattage rating (1/8W, 1/4W, 1/2W, 1W, or 2W).

Frequently Asked Questions

Why does an LED need a resistor?
An LED's voltage barely changes once it is conducting, so without something limiting the current it draws more and more current from the supply until it overheats and fails. A series resistor sets a fixed, safe current by dropping the voltage the LED does not use.
Where do I find my LED's forward voltage and current?
Check the LED's datasheet or packaging. As a rough guide, standard red, orange, and yellow LEDs run about 1.8 to 2.2 volts, green and blue or white LEDs run about 3.0 to 3.4 volts, and most indicator LEDs are rated for 20 mA of forward current, though low-power types may specify 2 to 5 mA.
What happens if I use the wrong resistor value?
Too small a resistor lets more current through than the LED is rated for, which overheats and can quickly destroy it. Too large a resistor limits current more than necessary, making the LED noticeably dimmer than it could be. When in doubt, round the resistor value up rather than down.
Can several LEDs share one resistor?
LEDs of the same type and forward voltage can be wired in series, where one resistor limits current for the whole chain — that is what the "LEDs in series" field models. Wiring LEDs in parallel behind a single shared resistor is not recommended, because small manufacturing differences mean one LED conducts slightly more than the others, hogging current until it fails and overloading the rest.