LED Resistor Calculator
Find the current-limiting resistor for one LED or many: exact ohms, the next E12/E24 value, the real LED current, resistor wattage and supply draw.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the LED Resistor Calculator?
An LED has almost no resistance once it starts to conduct, so connected straight across a battery it draws as much current as the battery can give and burns out. A series resistor fixes the current. This LED resistor calculator works out that resistor from the supply voltage, the LED forward voltage and the current you want, for a single LED, several LEDs in one series string, or several identical strings in parallel.
Pick a colour to load a typical forward voltage (the typical range is shown next to it), or type the figure from your datasheet. The result shows the exact resistance, the next standard E12, E24 or E96 value above it and the current that part really delivers, the power the resistor turns into heat with a recommended wattage, the power in each LED and the total current drawn from the supply.
A table lists the standard values either side of the exact answer with the current each one gives, and a short note shows how far the current moves if the LEDs drop 0.2 V more or less than expected. Warnings appear when the supply is too low for the string or the resistor has too little voltage left to regulate the current.
- Series strings and parallel strings, each with its own resistor
- Colour presets with typical forward voltage ranges, or your own datasheet value
- Next-higher and nearest E12, E24 and E96 values with the current each gives
- Resistor dissipation with a recommended wattage at 2× margin
- Warnings for too many LEDs, low headroom and high current
- Works offline in your browser; share a link with your inputs
How to use the LED Resistor Calculator
- Enter the supply voltage: the battery voltage or the regulated rail that feeds the LEDs.
- Choose the LED colour, or type the forward voltage from the datasheet. Typing a value switches the colour to Custom.
- Enter the current per string. 20 mA suits most 3 mm and 5 mm indicator LEDs; 5 to 10 mA is plenty for modern high-efficiency parts.
- Set how many LEDs are in series in each string and how many strings run in parallel.
- Pick E12, E24 or E96 and read the value to buy, the current it gives, the resistor wattage and the supply current. Use the table to compare neighbouring values.
Worked examples
One red LED on a 5 V USB rail
Input
Supply 5 V, Vf 2.0 V, 20 mA, 1 LED, E12
Output
150 Ω exactly, 60 mW in the resistor (1/8 W part or larger), 40 mW in the LED
The resistor sees 5 − 2 = 3 V, and 3 V ÷ 0.02 A = 150 Ω, which happens to be an E12 value. Only 40% of the supply power reaches the LED; the rest warms the resistor.
Red LED on a 9 V battery
Input
Supply 9 V, Vf 2.0 V, 20 mA, E12
Output
Exact 350 Ω; use 390 Ω for 17.95 mA and 126 mW; nearest 330 Ω gives 21.21 mA
126 mW doubled is more than 1/4 W, so the calculator recommends a 1/2 W resistor. A 9 V battery wastes 78% of its energy in the resistor here, which is one reason to put two or three LEDs in series.
Strip of white LEDs on 12 V
Input
Supply 12 V, Vf 3.2 V, 20 mA, 3 in series, 4 strings
Output
120 Ω per string, 48 mW each, 80 mA and 0.96 W from the supply
Three LEDs drop 9.6 V, leaving 2.4 V for the resistor. 80% of the power goes into the LEDs. Four LEDs would need 12.8 V, more than the supply, so the calculator refuses that and says three is the maximum.
Low-current indicator on a 3.3 V microcontroller pin
Input
Supply 3.3 V, Vf 2.0 V, 10 mA, E24
Output
130 Ω, 13 mW (1/16 W is enough)
GPIO pins are often limited to 8 to 20 mA, so 10 mA or less is a sensible target. The pin's own output resistance lowers the current a little further.
Background and insight
The formula is Ohm's law applied to the resistor alone. The LEDs take their forward voltage Vf each, so the resistor sees what is left: R = (Vs − n × Vf) ÷ I, where n is the number of LEDs in series. The resistor power is P = I² × R, and each LED dissipates Vf × I. Forward voltage depends on the semiconductor: about 1.2 to 1.6 V for infrared, 1.8 to 2.2 V for red, roughly 2 V for amber and yellow-green GaP parts, and 2.9 to 3.5 V for blue, white and true green InGaN parts at 20 mA. Those are typical ranges from manufacturer datasheets; the exact figure for your part is in its datasheet at the test current.
Because an LED behaves like a voltage source with a small series resistance, its current is very sensitive to the voltage across the resistor. With 7 V across the resistor, a 0.2 V change in Vf moves the current by about 3%. With 0.5 V across it, the same change moves the current by 40%. That is why the calculator warns when less than about 10% of the supply is left for the resistor, and why parallel LEDs each need their own resistor: forward voltage varies a little between parts, so with one shared resistor the LED with the lowest Vf takes most of the current.
Rounding up to the next standard value keeps the current at or below the target. The recommended resistor rating is the smallest standard wattage at least twice the calculated dissipation, a common derating practice that keeps the part cool, since resistors are rated at 70 °C ambient and derate above that.
Common use cases
Indicator lights on a project or PCB
Size the resistor for a power or status LED driven from a 3.3 V, 5 V or 12 V rail.
LED strips and arrays
Decide how many LEDs fit in each string on a given supply, and what each string's resistor should be.
Battery-powered gadgets
Compare the power wasted in the resistor with the power in the LEDs to see whether a series string or a driver is worth it.
Car and 12 V DC lighting
Check resistor wattage on a vehicle supply, remembering that a running engine raises 12 V to about 14.4 V.
Tips and limitations
- Design for the highest supply voltage the circuit will see: a "12 V" car system runs at 13.8 to 14.4 V when charging, which raises the current noticeably.
- Never wire LEDs in parallel on one shared resistor. Give each string its own resistor so current divides evenly.
- Leave at least 1 V, or 10 to 20% of the supply, across the resistor. Below that, small changes in forward voltage or supply cause large changes in current; use a constant-current driver instead.
- Power LEDs (350 mA and above) need heatsinking and are normally driven by a constant-current regulator. A resistor works but wastes power and does not compensate for Vf falling as the LED warms.
- Check the absolute maximum current in the datasheet. Many 3 mm and 5 mm LEDs are rated at 20 to 30 mA continuous; running them below that extends their life.
Frequently asked questions
What resistor do I need for an LED on 5 V?
For a red LED (about 2 V) at 20 mA, (5 − 2) ÷ 0.02 = 150 Ω. For a white or blue LED (about 3.2 V) at 20 mA, (5 − 3.2) ÷ 0.02 = 90 Ω, so use the next value up, 100 Ω, which gives 18 mA. A 1/4 W resistor is fine for both.
What resistor do I need for an LED on 12 V?
For one white LED at 20 mA, (12 − 3.2) ÷ 0.02 = 440 Ω; use 470 Ω, which gives 18.7 mA and dissipates about 165 mW, so a 1/2 W part is the safe choice. Putting three white LEDs in series on 12 V needs only 120 Ω and wastes far less power.
Can I run an LED without a resistor?
Only if something else limits the current, such as a constant-current driver or a coin cell whose internal resistance is high enough. On a stiff supply like a USB port or a bench power supply, an LED with no resistor draws far more than its rating and fails, sometimes instantly.
Should I round the LED resistor up or down?
Round up to the next standard value. A higher resistance gives slightly less current, which costs a little brightness but keeps the LED within its rating. The calculator shows both the next value up and the nearest value with their currents.
Can several LEDs share one resistor?
LEDs in series can share one resistor, because the same current flows through all of them. LEDs in parallel should not: their forward voltages differ slightly, so the one with the lowest Vf hogs the current. Give each parallel string its own resistor.
How many LEDs can I put in series on one supply?
The sum of the forward voltages must be below the supply with some voltage left for the resistor. On 12 V with 3.2 V white LEDs, three in series (9.6 V) leaves 2.4 V for the resistor; four would need 12.8 V and will not light properly.
Why does my LED get dimmer as the battery runs down?
The resistor sets the current from the voltage left after the LED. As the battery voltage falls, that leftover voltage falls proportionally faster, so the current drops. A constant-current driver keeps brightness steady across the battery's life.
What forward voltage should I use if I do not have a datasheet?
Use the typical value for the colour: about 2.0 V for red, 2.1 V for yellow, 3.2 V for white, blue and true green. Then measure the real current once the circuit is built, or design for 10 to 15 mA so a wrong guess still stays well inside the LED's rating.
Is there an in-depth guide to the LED Resistor Calculator?
Yes. “LED Current-Limiting Resistors: The Formula and the Judgment” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.