LED Resistor Calculator
Enter the supply voltage, LED forward voltage and current to get the resistor value, the nearest standard value and its power rating.

How to use the LED resistor calculator
- Enter the supply voltage (Vs) in volts, for example 5 for a USB-powered circuit or 12 for a 12 V supply.
- Enter the LED forward voltage (Vf) from the LED datasheet. If you do not have it, use a preset: red is about 2.0 V and white is about 3.2 V at 20 mA.
- Enter the LED current (I) you want, in milliamps.
- Enter the number of LEDs (n) connected in series in one string.
- Read the exact resistance, then the next standard value at or above it (E12 or E24).
- Check the actual current and the power rating for the standard value you plan to buy.
- If the tool says the LEDs cannot be driven from that supply, raise the supply voltage or reduce the number of LEDs in the string.
- Open “How it was calculated” to see the formula and each step with your own numbers.
When you are happy with the result, use Copy result to copy the result lines with a link. Copy link copies the page address, which stores every input, so opening it later restores the same calculation. Print / save as PDF prints the inputs, results, calculation steps and the date.
It works as a quick LED resistor cal for any supply.
How do you calculate the resistor for an LED?
Use R = (Vs − n × Vf) ÷ I, where Vs is the supply voltage, n is the number of LEDs in series, Vf is the forward voltage of one LED, and I is the current you want. The resistor takes whatever voltage is left after the LEDs have used their share, and Ohm’s law turns that leftover voltage and the target current into a resistance.
For a red LED (2 V, 20 mA) on a 5 V supply, the leftover voltage is 5 − 2 = 3 V. Then 3 ÷ 0.02 = 150 Ω. The power in the resistor is P = I² × R = 0.0004 × 150 = 0.06 W, so a 1/8 W resistor, which has a 2× margin, is suitable.
For a white LED (3.2 V, 20 mA) on 12 V, the leftover voltage is 8.8 V, and 8.8 ÷ 0.02 = 440 Ω. There is no 440 Ω value in the E12 series, so the next standard value at or above it is 470 Ω. Rounding up keeps the current at or below the target: 8.8 ÷ 470 is about 18.7 mA. The power in the 470 Ω resistor is about 0.0187² × 470 ≈ 0.165 W; doubled for the 2× margin that is 0.33 W, so the next standard rating is 1/2 W.
Can I put LEDs in series with one resistor?
Yes, provided the supply voltage is greater than the total forward voltage of the LEDs, n × Vf. LEDs in series share the same current, so one resistor sets the current for all of them. The resistor then only needs to drop the difference between Vs and n × Vf.
Three white LEDs (3.2 V each) on 12 V need 9.6 V in total, which leaves 2.4 V for the resistor. At 20 mA, 2.4 ÷ 0.02 = 120 Ω. Four white LEDs would need 12.8 V, which is more than 12 V, so they cannot be driven from that supply.
LEDs in parallel are different. Each parallel string needs its own resistor, because LEDs that share one resistor draw current unevenly.
Sources
Checked October 2026:
- R = (Vsupply − n × Vf) ÷ I (Ohm’s law); forward voltages are typical values: use the LED’s data sheet, for example Vishay TLHG540
- The 2× resistor power margin is a common design margin, not a standard
For estimation; verify critical designs against the applicable standard.
Worked examples
| Input | Result |
|---|---|
| Vs = 5 V, 1 × Vf = 2 V, I = 20 mA | R = 150 Ω → 150 Ω, 1/8 W |
| Vs = 12 V, 1 × Vf = 3.2 V, I = 20 mA | R = 440 Ω → 470 Ω, 1/2 W |
| Vs = 12 V, 3 × Vf = 3.2 V, I = 20 mA | R = 120 Ω → 120 Ω, 1/8 W |
| Vs = 3.3 V, 1 × Vf = 2 V, I = 10 mA | R = 130 Ω → 130 Ω, 1/8 W |
| Vs = 24 V, 4 × Vf = 2 V, I = 15 mA | R = 1.067 kΩ → 1.1 kΩ, 1/2 W |
Calculated by the tool above with these values.
Frequently asked questions
What resistor do I need for an LED on 12V?
It depends on the LED’s forward voltage and the current you want. A white LED at 3.2 V and 20 mA needs about 440 Ω, so the standard value is 470 Ω at 1/2 W. Enter your own Vf from the datasheet to check your LED.
What resistor for an LED on 5V?
A red LED at about 2 V and 20 mA on 5 V needs 150 Ω, and a 1/8 W resistor is enough for that. Use the forward voltage from your LED’s datasheet, since different LEDs vary.
What wattage resistor do I need for an LED?
Work out the power with P = I² × R, using the current and the resistance. The tool gives a rating with a 2× margin, chosen from 1/8, 1/4, 1/2, 1 or 2 W. Small indicator LEDs often need only 1/8 W or 1/4 W.
Can I put LEDs in series with one resistor?
Yes, as long as the supply voltage is greater than the sum of the LEDs’ forward voltages. If it is not, the tool says the LEDs cannot be driven from that supply.
What is the forward voltage of an LED?
It is the voltage the LED needs across it to light at its rated current, and it is listed in the datasheet. The presets use about 2.0 V for red and about 3.2 V for white at 20 mA, but a specific LED may differ.
Related tools
- Resistor color code calculator: use it to read the value of a resistor from its color bands once you have bought or found one.
- Parallel resistor calculator: use it to combine resistors in parallel when a standard value is not available.
- Voltage divider calculator: use it to split a supply voltage into a smaller voltage with two resistors.
- 555 timer calculator: use it to work out timing values for a 555 timer circuit that might drive an LED.
- All calculators: use it to browse every calculator on the site.