LED Resistor Calculator
A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call
Free LED resistor calculator. Find the series resistor for one or more LEDs from supply voltage, forward voltage and current, with power rating.
- Nearest standard (E24)
- 0
- Nearest standard (E12)
- 0
- Resistor power
- 0
- Current with E24 value
- 0
Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.
How to use the LED resistor calculator
- Enter the supply voltage, such as 5 V from USB or a microcontroller, 9 V from a battery, or 12 V from a car or power adapter.
- Enter the LED's forward voltage, from its datasheet. Typical values are about 1.8 to 2.2 V for red, yellow and orange LEDs, and about 2.8 to 3.4 V for white, blue and true green LEDs.
- Enter the LED current in milliamps. Many standard 5 mm indicator LEDs are rated for about 20 mA; many modern LEDs are bright enough at 5 to 10 mA.
- Enter the number of LEDs in series, if you're driving more than one with a single resistor.
The LED resistor calculator shows the exact resistance, the nearest standard resistor values in the E24 and E12 series, the power the resistor will dissipate, and the actual current with the E24 resistor.
Why LEDs need a resistor
An LED is a diode, and diodes don't behave like ordinary resistors. Once the voltage across an LED reaches its forward voltage, its current rises very steeply with even a small increase in voltage. Connected directly to a supply above its forward voltage, an LED would draw far more current than it's designed for and quickly overheat and fail. A series resistor limits the current to a safe value by dropping the extra voltage.
The LED resistor formula
The resistor must drop the difference between the supply voltage and the LEDs' forward voltage, at the chosen current. By Ohm's law:
R = (V_supply − n × V_forward) ÷ I
- V_supply is the supply voltage.
- V_forward is the forward voltage of one LED.
- n is the number of LEDs in series.
- I is the current in amps (milliamps ÷ 1,000).
The power dissipated in the resistor is:
P = (V_supply − n × V_forward) × I
With the default figures, a 5 V supply, a red LED with a forward voltage of 2 V and a current of 20 mA need a resistor of (5 − 2) ÷ 0.02 = 150 ohms, dissipating 3 × 0.02 = 0.06 W, or 60 mW. A common 0.25 W resistor is more than enough.
Choosing a standard value
Resistors are made in standard values, the E series. The LED resistor calculator picks the next standard value up from the exact result, so the current stays at or slightly below your target, which is the safe direction. If the exact value is 140 Ω, for example, it suggests 150 Ω in both the E12 and E24 series. A slightly higher resistor makes the LED a little dimmer, which is rarely noticeable.
A worked example: three white LEDs on 12 V
You want to light three white LEDs in series from a 12 V supply. Each has a forward voltage of 3.2 V and you want 20 mA.
- Total forward voltage: 3 × 3.2 = 9.6 V.
- Voltage across the resistor: 12 − 9.6 = 2.4 V.
- Resistance: 2.4 ÷ 0.02 = 120 Ω.
- Resistor power: 2.4 × 0.02 = 0.048 W.
A 120 Ω resistor is a standard value in both series. Enter 12, 3.2, 20 and 3 LEDs in the LED resistor calculator to check. Putting LEDs in series like this is efficient: most of the power goes into light, and only 2.4 V of the 12 V is wasted in the resistor.
Series or parallel?
When driving several LEDs, it's better to connect them in series with one resistor, or to give each parallel branch its own resistor. Avoid connecting LEDs in parallel with a single shared resistor. LEDs from the same batch can have slightly different forward voltages, so in parallel the one with the lowest voltage takes most of the current, gets hotter, its voltage drops further, and it can take even more current until it fails. With a separate resistor in each branch, the current divides evenly.
The limit on how many LEDs you can put in series is the supply voltage: the total forward voltage must be less than the supply, with some headroom left for the resistor to regulate the current. A margin of at least a volt or two gives more stable brightness as the supply varies.
Power rating
Choose a resistor whose power rating is comfortably above the calculated power, commonly at least double, so it runs cool. Most through-hole resistors are rated at 0.25 W or 0.5 W. With higher supply voltages and currents, the power can climb quickly: a single 20 mA LED with a 2 V forward voltage on a 24 V supply needs a 1,100 Ω resistor dissipating 0.44 W, which is too much for a 0.25 W resistor and wastes over 90% of the power. In cases like that, put more LEDs in series or use a constant-current LED driver.
Who uses an LED resistor calculator
Electronics hobbyists and makers use it for indicator lights, LED strips and Arduino and Raspberry Pi projects. Model railway and dollhouse builders use it for scenery lighting. Car and bike enthusiasts use it when adding LEDs to 12 V systems. Students use it to learn Ohm's law in a practical way, and engineers use it for quick checks when designing indicator circuits.
Need more customers from Google?
This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. DeepRit manages Google Ads for small and mid-size businesses, and only Google Ads. We check your account before we ever get on a call, then fix the structure, the keywords, the tracking and the ads, with month-to-month terms and no long contract. Book a free audit call.
Driving LEDs from microcontroller pins
Microcontroller pins can usually supply only a limited current, often somewhere between a few milliamps and about 20 mA per pin depending on the chip, with a total limit for the whole chip. Check the datasheet before driving LEDs directly. Modern LEDs are often bright enough at 2 to 5 mA for indicators, which keeps the load on the pin small. For a 3.3 V pin and a red LED with a 2 V forward voltage at 5 mA, the resistor is (3.3 − 2) ÷ 0.005 = 260 Ω, rounded up to 270 Ω. For bigger loads, use a transistor to switch the LED.
High-power LEDs
High-power LEDs, typically rated at 350 mA or more, aren't usually driven with a simple resistor, because the resistor would waste a lot of power and the current would vary with temperature and supply voltage. Instead, they use constant-current drivers, which regulate the current directly and efficiently. They also need heat sinks, because a large share of their power becomes heat at the LED itself.
Common mistakes
- Forgetting the resistor, which can destroy an LED in moments.
- Using a typical forward voltage that doesn't match your LED. Check the datasheet.
- Sharing one resistor between parallel LEDs.
- Choosing a resistor with too low a power rating for high-voltage supplies.
Finding the forward voltage
The forward voltage depends on the LED's colour and construction, and it varies slightly between individual LEDs and with current and temperature. The datasheet gives a typical value and a maximum at a stated current. If you don't have a datasheet, you can measure it: connect the LED in series with a resistor of around 1 kΩ to a 5 V supply, and measure the voltage across the LED with a multimeter. Use that value in the LED resistor calculator. If you're unsure, using a slightly lower forward voltage than the real one gives a slightly larger resistor and a slightly lower current, which errs on the safe side.
LED strips and modules
Many LED strips and ready-made modules already include current-limiting resistors or drivers, and are designed for a specific supply voltage such as 5 V, 12 V or 24 V. Adding another resistor isn't needed, and using the wrong supply voltage can damage them. The LED resistor calculator is for individual LEDs or simple strings you wire yourself. For strips, follow the manufacturer's specifications for voltage and maximum length per power feed.
Sources and further reading
- Light-emitting diode on Wikipedia: how LEDs work and their electrical characteristics.
- LED circuit on Wikipedia: series resistors, drivers and wiring.
- Ohm's law on Wikipedia: the relationship behind the resistor calculation.
Frequently asked questions
How do I calculate an LED resistor?
R = (supply voltage − LED forward voltage) ÷ current in amps.
What resistor do I need for an LED on 5 V?
For a red LED at 2 V and 20 mA, 150 Ω. For a white LED at 3.2 V and 20 mA, 90 Ω, rounded up to 91 Ω.
Can I use one resistor for several LEDs?
Yes, if the LEDs are in series. For parallel LEDs, give each one its own resistor.
What power rating does the resistor need?
At least the calculated power, preferably double. 0.25 W is enough for most small indicator LEDs.
What if I use a slightly bigger resistor?
The LED will be slightly dimmer, which is safe and often unnoticeable.
Is the LED resistor calculator free?
Yes. It's free, needs no sign-up, and works in your browser.
Free PPC audit
See where your ad budget leaks.
We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.