Every LED needs something to limit its current, and for most hobby circuits that is a single series resistor. This calculator works out the exact value from R = (Vs − n·Vf) ÷ I, then rounds up to the standard E12 and E24 values you can actually buy, shows the current each one really gives, the heat it has to shed, the power rating to order, and its color bands. Series strings and parallel strings are both handled, and everything is calculated in your browser.
For other circuit math, the Ohm's law calculator solves any two of voltage, current, resistance, and power, and the resistor color code calculator decodes bands on a part you already have. Running LEDs a long way from the supply? Check the voltage drop on the wire first.
Frequently asked questions
How do I calculate the resistor for an LED?
Subtract the LED forward voltage from the supply voltage, then divide by the current you want: R = (Vs − Vf) ÷ I. For a red LED (about 2 V) on 5 V at 20 mA that is (5 − 2) ÷ 0.02 = 150 Ω. With several LEDs in series, multiply the forward voltage by the number of LEDs first. The result is rarely a value you can buy, so the calculator rounds up to the next E12 and E24 standard value — rounding up means the LED gets slightly less current than you asked for, never more.
Why does the calculator round up instead of to the nearest value?
A resistor below the exact value lets more current through than you designed for, which shortens LED life and can exceed its absolute maximum rating. Rounding up costs a few percent of brightness that your eye will not notice. The calculator shows the actual current each standard value gives, so you can see the trade-off. If the next value up is far from exact, E24 (5 %) usually lands closer than E12 (10 %); both series are defined in IEC 60063 and stocked everywhere.
What power rating does the resistor need?
The resistor turns the leftover voltage into heat: P = I² × R. A typical indicator LED on 5 V dissipates around 60 mW in its resistor, so a 1/8 W part is fine. The calculator recommends the next standard rating at or above twice the calculated dissipation, because resistors run hot at their full rating and the rating assumes good airflow. When the recommendation climbs past a watt or two, you are wasting a lot of power — a constant-current LED driver is the better tool.
Can I use one resistor for several LEDs in parallel?
Avoid it. LEDs of the same type still have slightly different forward voltages, and they get hotter as they conduct, which lowers the forward voltage further. With a shared resistor the LED with the lowest forward voltage hogs the current, heats up, and hogs even more. Give each parallel string its own resistor — the calculator assumes exactly that and reports the total resistor count and supply current for the whole array.
Why does it reject my supply voltage?
A series resistor only works when the supply is higher than the total LED forward voltage. If three white LEDs at 3.2 V each need 9.6 V and you have 9 V, no resistor value can make them light properly. Use fewer LEDs per string and add parallel strings, or raise the supply. Even when the supply is just barely higher, current becomes very sensitive to small voltage changes, so aim for at least a volt or two of headroom where you can.