Saved

Press the star next to a tool's name to save it.

All my tools

LED Resistor Calculator

This LED resistor calculator works out the series resistor for one or more LEDs from the supply voltage, forward voltage and current, rounds it to a standard value and gives the power rating.

Restored your last values ·

Take the forward voltage and current from the LED's datasheet. The resistor is rounded up to the next standard value, so the current stays at or below your target.

Everything is worked out in your browser. Nothing you type is sent anywhere.

Resistor to use

–

Enter the supply voltage, the LED's forward voltage and current.

See full result

An LED resistor calculator works out the series resistor an LED needs so that it gets the right current and doesn't burn out. Enter the supply voltage, the LED's forward voltage and the current you want, plus how many LEDs are wired in series, and this LED resistor calculator gives the exact resistance, the nearest standard resistor above it, the real current that will flow, and the power the resistor has to handle. It's the classic sum for indicator LEDs on breadboards, battery projects and Arduino builds.

Why an LED needs a resistor

An LED's voltage drop stays almost the same across a wide range of currents, so a small increase in the voltage across it causes a big increase in current. Connected straight to a battery, it can draw far more current than it's rated for and fail. The simplest way to drive an LED is through a series resistor, which limits the current. It's used for the indicator lights and displays in many appliances. It isn't energy-efficient, because the resistor turns some energy into heat, but it's simple and reliable for small LEDs.

The LED resistor calculator formula

Ohm's law and Kirchhoff's laws give the resistor value: subtract the LED's forward voltage from the supply voltage, then divide by the current you want.

R = (supply voltage − number of LEDs × forward voltage) ÷ current

With the current in amps, R comes out in ohms, so 20 mA is 0.02 A. The forward voltage, written Vf on datasheets, depends on the LED's material and color, so always use the figure for your part. With a high enough supply, several LEDs can share one resistor in series; their forward voltages add up.

Worked example: one LED on a 9 V battery

  1. Supply 9 V, forward voltage 2 V, target current 20 mA.
  2. Voltage across the resistor: 9 − 2 = 7 V.
  3. R = 7 ÷ 0.02 = 350 Ω.
  4. The next E12 value up is 390 Ω.
  5. Actual current: 7 ÷ 390 ≈ 17.9 mA, safely under 20 mA.
  6. Resistor power: 0.0179² × 390 ≈ 126 mW, so use a 1/2 W resistor to keep at least twice the margin.

Worked example: three LEDs in series on 12 V

Three LEDs with a 3 V forward voltage each drop 9 V together. On a 12 V supply, the resistor drops 3 V. At 20 mA, R = 3 ÷ 0.02 = 150 Ω, which is a standard value. The resistor dissipates 0.02² × 150 = 60 mW, so a 1/8 W part is enough.

Standard resistor values

Resistors are sold in standard series. The E12 series has 12 values per decade (1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8 and 8.2, times a power of ten), and the E24 series has 24, so its steps are closer together. The calculator rounds up to the next standard value so the LED never gets more current than you asked for. If you need a value in between, put two resistors in series.

Choosing the current

Small indicator LEDs are commonly run at 2 mA, 10 mA or 20 mA, and very bright LEDs can even work as indicators at less than a milliamp. Lower current means a dimmer LED and a longer battery life. Never go above the maximum current on the datasheet.

Power rating

The resistor turns the extra voltage into heat. The calculator works out that power from the actual current and chooses a rating at least twice as large, picking from 1/8 W, 1/4 W, 1/2 W, 1 W, 2 W, 3 W and 5 W. If it needs more than a few watts, the circuit is wasting a lot of energy, and an LED driver would be a better choice.

How to use the LED resistor calculator

  1. Enter the supply voltage, such as 5 V from USB or an Arduino, 9 V from a battery or 12 V from an adapter.
  2. Enter the LED's forward voltage from its datasheet or the seller's listing.
  3. Enter the current in milliamps.
  4. Add the number of LEDs if several are wired one after another in series.
  5. Choose E12 or E24 for the standard values you have.
  6. Press Calculate.

Testing your circuit

After wiring the LED and resistor, measure the voltage across the resistor with a multimeter and divide it by the resistance to check the real current. If the LED is brighter or dimmer than you want, change the current in the calculator and pick a new resistor. Remember that LEDs only work one way round: the longer lead, the anode, goes toward the positive side of the supply.

LEDs with a microcontroller

When an Arduino or another microcontroller pin drives an LED, the pin is the supply. Use the board's logic voltage, such as 5 V or 3.3 V, and keep the current within what the pin can safely provide, which is listed in the board's datasheet. A lower current, such as 5 to 10 mA, is often plenty for an indicator and puts less load on the pin. If a 3.3 V board can't light an LED with a high forward voltage brightly, use a transistor to switch the LED from a higher supply instead.

Common mistakes

  • Forgetting the resistor. An LED on a battery alone can fail in seconds.
  • Using milliamps in the formula. Divide mA by 1,000 to get amps.
  • Ignoring the forward voltage. Use the datasheet figure for your LED's color.
  • Putting LEDs in parallel on one resistor. Give each parallel LED its own resistor.

What next

Use this often? Add LED Resistor to your Home screen.

Frequently asked questions

How does the LED resistor calculator work?

It subtracts the total forward voltage of the LEDs from the supply voltage and divides by the current, R = (Vs − n × Vf) ÷ I, then rounds up to a standard resistor and works out the power.

What resistor do I need for an LED on 9 V?

For a 2 V LED at 20 mA, (9 − 2) ÷ 0.02 = 350 Ω, so use the next standard value, 390 Ω.

Can I use it as an LED series resistor calculator for several LEDs?

Yes. Enter the number of LEDs in series; their forward voltages add up before the resistor is worked out.

Why round the resistor up?

A larger resistor gives slightly less current, so the LED stays at or below its target.

What power rating should the resistor have?

At least twice the power it dissipates. The calculator picks a standard rating with that margin.

What went wrong?

We only receive the reason you pick, never what you typed into the tool.

Thanks for your feedback.

More Physics & Science Tools