Free automation and electronics calculators

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.

Open on PLCDriveHub

Embed

Embed this tool

Copy this code into your website, blog or class page. The tool runs inside your page.

Please keep the credit link below the tool.

The LED resistor calculator works out the current limiting resistor for an LED, or for several LEDs in series, from your supply voltage. You enter the supply voltage, the LED forward voltage and the LED current, and it returns the exact resistance, the next standard value, the actual current, and the power rating for the resistor. It runs in your browser, is free, and needs no sign-up. It also handles parallel strings, with a separate resistor for each string, and it works on a phone. Results update as you change the inputs, so you can compare LEDs and supply voltages side by side.
Led resistor calculator example

How to use the LED resistor calculator

  1. Enter the supply voltage (Vs) in volts, for example 5 for a USB-powered circuit or 12 for a 12 V supply.
  2. 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.
  3. Enter the LED current (I) you want, in milliamps.
  4. Enter the number of LEDs (n) connected in series in one string.
  5. Read the exact resistance, then the next standard value at or above it (E12 or E24).
  6. Check the actual current and the power rating for the standard value you plan to buy.
  7. 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.
  8. 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

InputResult
Vs = 5 V, 1 × Vf = 2 V, I = 20 mAR = 150 Ω → 150 Ω, 1/8 W
Vs = 12 V, 1 × Vf = 3.2 V, I = 20 mAR = 440 Ω → 470 Ω, 1/2 W
Vs = 12 V, 3 × Vf = 3.2 V, I = 20 mAR = 120 Ω → 120 Ω, 1/8 W
Vs = 3.3 V, 1 × Vf = 2 V, I = 10 mAR = 130 Ω → 130 Ω, 1/8 W
Vs = 24 V, 4 × Vf = 2 V, I = 15 mAR = 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.