LED Resistor Calculator: Series Resistor for One or More LEDs
Enter your supply voltage and the LED’s forward voltage and current from its datasheet to get the resistor to put in series, the standard value to buy and the heat it must handle.
For learning and low-voltage classroom projects with batteries or a bench supply. Mains electricity is dangerous: never connect an LED and resistor to it. Real wiring follows the local electrical code and a licensed electrician.
This tool runs in your browser. Nothing you type is uploaded or saved, and there is nothing to install or sign up for.
Why an LED needs a resistor at all
A light-emitting diode (LED) is not like a light bulb. Below a certain voltage it passes almost nothing; just above it, the flow of electricity through it shoots up very steeply. Connect an LED straight to a battery whose voltage is higher than the LED wants and the flow can climb far past what the part survives. A resistor placed in line with the LED, called a series resistor, sets the limit.
Three numbers decide its size. The supply voltage (Vs, in volts) is what your battery or power supply provides. The forward voltage (Vf, in volts) is what the LED itself uses up while lit. The forward current (I, in milliamperes, mA) is how much flow you want through it. This calculator turns those into a resistance in ohms (Ω), rounds it to a value you can actually buy, and tells you how warm the resistor will run.
Using the calculator with your own LED
- Enter the Supply voltage of your battery pack or supply.
- Look up your LED’s forward voltage and type it in. The number in the box when the page opens is a placeholder example, not a recommendation: Vf differs between LED colors and types, and the maker’s datasheet is the place to find it.
- Enter the LED current in milliamps. The datasheet gives a maximum; choosing less makes the LED dimmer but leaves a safety margin and saves battery.
- If several identical LEDs are wired nose to tail in one chain, set LEDs in series.
- Read the resistor in the navy panel, then the tiles and rows for current, heat and color bands. Copy result keeps the resistor value and its working for your notes, and Reset goes back to the single LED example.
Worked example: one LED on a 9 V battery
With the page’s starting values (9 V supply, example Vf of 2 V, example current of 20 mA, one LED):
- Voltage left for the resistor: 9 − 2 = 7 V.
- Current in amperes: 20 mA = 0.02 A.
- Resistance:
R = 7 / 0.02 = 350 Ω. - 350 Ω is not a standard value, so step up to the next one in the E12 series: 390 Ω (bands orange, white, brown).
- Real current with 390 Ω: 7 ÷ 390 = 17.95 mA, safely under the 20 mA target.
- Heat in the resistor: 7 V × 17.95 mA = 125.6 mW.
The row for the next value below shows why the tool rounds up and not down: 330 Ω would let 21.21 mA flow, more than you asked for.
A chain of three LEDs
Set the supply to 12 V, Vf to 3.2 V, the current to 15 mA and the count to 3. The three LEDs use 9.6 V between them, leaving 2.4 V for the resistor, so R = 2.4 ÷ 0.015 = 160 Ω. The E12 value at or above that is 180 Ω, which gives 13.33 mA.
The formula, piece by piece
R = (Vs − n × Vf) / I
Here n is the number of LEDs in the chain. In a series circuit the voltages of the parts add up to the supply voltage, so whatever the LEDs do not use must appear across the resistor. Ohm’s law (resistance = voltage ÷ current) then gives the resistor that passes exactly the wanted current at that leftover voltage.
| Result | How it is found |
|---|---|
| Voltage across the resistor | Vs − n × Vf |
| Current with the chosen resistor | (Vs − n × Vf) / R |
| Heat in the resistor | I × I × R |
| Power in the LEDs | n × Vf × I |
| Power from the supply | Vs × I |
Resistors are sold in fixed steps. The E12 series used here has twelve values in every factor of ten: 10, 12, 15, 18, 22, 27, 33, 39, 47, 56, 68 and 82, then the same digits times 10, 100 and so on. Picking the step at or above the calculated value can only lower the current, which is the safe direction.
Limits and common wiring errors
- Guessing the forward voltage. No table of typical values is built into this page on purpose. Use the figure for your exact part, or measure it in a working circuit.
- Too many LEDs for the supply. If the chain’s total forward voltage reaches the supply voltage, nothing is left for the resistor and the tool stops with a message.
- A very small leftover voltage. When only a fraction of a volt remains for the resistor, small changes in battery voltage swing the current a lot. Leave more headroom or use fewer LEDs per chain.
- One resistor for LEDs side by side. LEDs wired in parallel do not share current evenly. Give each branch its own resistor and calculate each branch separately.
- Ignoring the resistor’s power rating. Compare the heat figure with the wattage rating on the resistor pack. A widely used guideline is to pick a rating at least twice the calculated power.
- LED the wrong way round. An LED only lights in one direction; the longer leg normally goes toward the positive side.
The result assumes a steady supply and a forward voltage that stays fixed. In reality Vf shifts slightly with current and temperature, and a fresh battery sits a little above its label voltage, so treat the answer as a sound starting point and stay below the LED’s maximum current.
Classroom and science-fair uses
An LED and its resistor is often the first circuit a student builds on a breadboard. Have the class predict the resistor here, find it in the kit by its stripes with the resistor color code calculator, and then build the circuit.
The step from leftover voltage to resistance is a single use of the rule covered by the Ohm’s law calculator, which is worth trying with the same numbers.
If the kit lacks the suggested value, two parts can stand in for one; the series and parallel resistor calculator shows which combinations come close.
For a display that has to run through a whole science fair, take the supply current from this page to the battery life calculator to estimate how long the batteries last.
To make the LED blink instead of glowing steadily, the 555 timer calculator sizes the parts of a simple flasher circuit.
Other electronics pages are listed among the science and engineering calculators.
The complete set of free online tools includes math, conversion and classroom helpers as well.
Frequently asked questions
How do I calculate the resistor for an LED?
Subtract the LED forward voltage from the supply voltage and divide by the current in amperes. For a 9 V supply, a 2 V LED and 20 mA, that is 7 / 0.02 = 350 ohms, and the next standard E12 value up is 390 ohms.
Why round the LED resistor up instead of down?
A larger resistor lets less current through, so rounding up keeps the LED at or below the current you chose. In the 350 ohm example, 390 ohms gives about 17.95 mA while 330 ohms would give about 21.21 mA.
What resistor do I need for several LEDs in series?
Multiply the forward voltage by the number of LEDs, subtract that from the supply voltage and divide by the current. Three 3.2 V LEDs at 15 mA on 12 V leave 2.4 V, which needs 160 ohms, so use 180 ohms.
Which forward voltage should I type in for my LED?
In the datasheet from the maker or seller, listed as forward voltage or Vf at a stated test current. It varies with LED color and type, so this page asks you to enter it instead of assuming a value.
How much power does the LED resistor have to handle?
Multiply the voltage across the resistor by the current through it. With 7 V across 390 ohms the resistor turns about 125.6 mW into heat, so its power rating should be comfortably higher than that.
What happens if I connect an LED without a resistor?
If the supply voltage is higher than the LED forward voltage, the current is limited only by the supply and can rise far above the LED rating, which can destroy the LED quickly. A series resistor keeps the current at a chosen level.
