LED Resistor Calculator

Pick the right current-limiting resistor for your LEDs.

LED Resistor Calculator tool

V
V
mA
—
Exact resistance
—
Nearest E12 value (round up)
—
Nearest E24 value (round up)
—
Current with the E12 resistor
—
Resistor power and rating

About the LED Resistor Calculator

An LED needs a series resistor to limit its current, or it can burn out almost instantly. This LED resistor calculator works out the exact resistance from the supply voltage, the LED's forward voltage and the desired current, for one LED or several in series: a red LED with a 2 V forward voltage on a 5 V supply at 20 mA needs 150 Ω. It suggests the nearest standard resistor value and the power rating to use.

The formula is R = (Vs − n × Vf) ÷ I, where Vs is the supply voltage, Vf the forward voltage of each LED, n the number of LEDs in series and I the current in amps. Forward voltages depend on the LED color and chemistry: about 1.8 to 2.2 V for red, orange and yellow, and about 3.0 to 3.4 V for blue and white. Rounding the resistance up keeps the current slightly below the target, which is the safe direction. The resistor dissipates P = I² × R.

Example: a red LED at 2.0 V on a 5 V supply at 20 mA needs (5 − 2) ÷ 0.02 = 150 Ω, a standard value, and the resistor dissipates 0.06 W, so a 1/8 W resistor is enough with a twofold margin. A white LED at 3.2 V on 12 V needs 440 Ω, so use the next standard value, 470 Ω, giving about 18.7 mA. Three white LEDs in series on 12 V need only (12 − 9.6) ÷ 0.02 = 120 Ω.

Check LED datasheets for forward voltage and maximum current. To read resistor bands use the resistor color code calculator, for general circuits the Ohm's law calculator, and for combining resistors the resistors in parallel calculator.

How to use the LED Resistor Calculator

  1. Enter the supply voltageType the battery or power supply voltage.
  2. Choose the LEDPick a color preset or type the forward voltage from the datasheet.
  3. Set current and countEnter the LED current in mA and how many LEDs are in series.
  4. Read the resistorSee the exact value, the standard E12 and E24 values and the power rating.

LED Resistor Calculator features

  • Exact series resistance
  • Nearest standard E12 and E24 values
  • Actual current with the standard resistor
  • Resistor power and recommended rating
  • LED color presets
  • Several LEDs in series
  • Warns when the supply is too low

Common uses

  • Arduino and Raspberry Pi projects
  • Indicator lights in electronics
  • LED strips and model lighting
  • Car and bike LED conversions
  • Electronics classes and kits

LED resistors in practice: battery projects, series strings, microcontrollers, LED strips and lifetime

By the FreeToolsWorld editorial team · Updated November 2026 · How we write and check our guides

An LED needs something to limit its current, and for small indicator LEDs that something is usually a single resistor. Choosing it correctly keeps the LED bright, cool and long-lived, while a wrong value can burn it out in seconds or leave it dim. This guide works through a 9-volt battery project and a series string, explains the limits of microcontroller pins, covers LED strips and high-power LEDs and gives practical tips on polarity and heat.

A worked example: a blue LED on a 9 V battery

A blue LED with a forward voltage of about 3.0 V, run at 20 mA from a 9 V battery, needs (9 − 3) ÷ 0.02 = 300 Ω. The nearest common value above that is 330 Ω, which gives about 18 mA, a barely noticeable difference in brightness. The resistor dissipates about 0.11 W, so a standard 1/4 W resistor is fine.

Rounding up to the next standard value is the safe choice, because it keeps the current slightly below the target rather than above it.

LEDs in series

Several LEDs in series share one current and one resistor. Three red LEDs at about 2 V each, on a 12 V supply at 15 mA, need (12 − 6) ÷ 0.015 = 400 Ω, so a 390 Ω or 470 Ω resistor works, depending on whether you prefer slightly more or slightly less brightness. Series strings waste less power in the resistor than separate LEDs on the same supply, which makes them efficient for lighting.

Microcontroller pins

Boards such as Arduino and ESP32 can drive small LEDs directly from their pins, but each pin has a current limit. Many designers keep pin currents to around 10 to 20 mA, well below the absolute maximum, and use a transistor when more current is needed. For a red LED on a 5 V pin at 10 mA, a resistor of about 300 Ω, rounded to 330 Ω, is typical; at 3.3 V, about 130 Ω, rounded to 150 Ω.

LED strips

Common 12 V and 24 V LED strips already contain resistors or small driver chips for each group of LEDs, so they connect directly to a suitable power supply without extra resistors. The important calculation for strips is the total current: a 5-metre strip rated at 14.4 W per metre draws 72 W, about 6 A at 12 V, which determines the size of the power supply and wiring.

High-power LEDs

High-power LEDs, such as those in torches and lamps, draw hundreds of milliamps or more and get hot. They are normally driven by constant-current drivers rather than resistors, because a resistor would waste a lot of power and the LED's forward voltage changes with temperature. They also need heat sinks to stay within safe temperatures.

Polarity

LEDs only work one way round. The longer leg is usually the anode, connected towards the positive supply, and the flat edge on the rim marks the cathode. Connecting an LED backwards usually does no harm at low voltages, but it will not light. If an LED stays dark, checking polarity is the first step.

Brightness and lifetime

LED brightness rises with current, but so does heat. Running an LED below its maximum current, for example at 10 mA instead of 20 mA, often gives plenty of light for indicators and greatly extends its life. Modern high-efficiency LEDs can be surprisingly bright at just a few milliamps.

Common mistakes

  • Connecting an LED directly to a battery without a resistor.
  • Rounding the resistor value down instead of up.
  • Using a single resistor for several LEDs in parallel.
  • Ignoring the resistor's power rating on higher-voltage supplies.

Related tools

To read resistor values, use Resistor Color Code Calculator. For voltage, current and power, try Ohm's Law Calculator, and to combine resistors for an exact value, Resistors in Parallel Calculator.

LEDs and mains electricity

LEDs should not be connected to mains electricity with a simple resistor in normal projects, because the resistor would have to drop over 200 volts, wasting a lot of power and running very hot. Mains LED lamps contain dedicated driver circuits. Hobby projects should use low-voltage supplies, and anything involving mains wiring should be left to qualified people.

Colours and forward voltage

Different colours have different forward voltages: red, yellow and orange LEDs typically need about 1.8 to 2.2 V, while green, blue and white LEDs typically need about 2.8 to 3.4 V. Mixing colours in one series string or on one resistor gives uneven brightness, so calculate resistors separately for each colour.

A quick test with a coin cell

A quick way to test a small LED is to touch it across a 3 V coin cell, longer leg to the positive side. The coin cell's internal resistance limits the current, so most small LEDs light briefly without a resistor. It is a handy check for polarity and working LEDs before soldering, though not a way to run them permanently.

Limits

Forward voltages vary between LEDs and with temperature. Check the datasheet for exact values and current limits.

Frequently asked questions

Why does an LED need a resistor?

An LED's current rises very steeply once its forward voltage is reached, so a small change in supply voltage can cause a huge current. A series resistor limits the current to a safe value.

How do I calculate the resistor for an LED?

Subtract the LED's forward voltage from the supply voltage and divide by the current in amps: R = (Vs − Vf) ÷ I. For 9 V, a 2 V LED and 20 mA: 7 ÷ 0.02 = 350 Ω, so use 390 Ω.

What current should I use for an LED?

Standard 5 mm LEDs are typically rated at 20 mA maximum, but 5 to 15 mA is often bright enough and extends their life. High-power LEDs need far more current and usually a constant-current driver.

What is forward voltage?

The voltage across an LED when it is lit at its rated current. It depends on the color and material: roughly 2 V for red and yellow LEDs and about 3.2 V for blue and white ones.

Should I round the resistor value up or down?

Up, to the next standard value. A slightly larger resistor gives slightly less current, which is safe; a smaller one gives more current than intended.

What wattage resistor do I need?

Calculate P = I² × R and choose a rating at least double that. For 20 mA through 150 Ω, P = 0.06 W, so a common 1/8 W or 1/4 W resistor is fine.

Can I use one resistor for several LEDs?

For LEDs in series, yes, with a single resistor sized for the combined forward voltage. For LEDs in parallel, give each its own resistor, because small differences in forward voltage make the current share unevenly.

What if the supply voltage is lower than the LED voltage?

The LED will not light properly, because it needs at least its forward voltage. Use fewer LEDs in series, or a higher supply voltage. A boost converter can also raise a low battery voltage to drive LEDs.