LED Resistor Calculator

Calculate the series current-limiting resistor needed to safely drive an LED from a given supply voltage. Based on Ohm's law: it uses the supply voltage, the LED's forward voltage drop, and the desired forward current to find the required resistance (in ohms), the power the resistor must dissipate, and the voltage dropped across it.

Required resistance150 Ω
Voltage across resistor
3 V
Resistor power dissipation
0.06 W

Resistance is given in ohms (Ω). Choose the nearest standard resistor value that is equal to or greater than this result, and a power rating at least double the calculated dissipation for safety. The supply voltage must exceed the LED forward voltage for a valid result.

What the LED Resistor Calculator Does

This LED resistor calculator finds the correct series resistor to safely drive a single LED from a fixed power supply. You enter three values: the supply voltage, the LED's forward voltage, and the LED's desired forward current in milliamps. The tool returns the resistance in ohms.

It is useful for anyone wiring an LED into a circuit: hobbyists building a project on a breadboard, students learning Ohm's law, and makers adding an indicator light to an Arduino, Raspberry Pi, or 12 V automotive system. Sizing the resistor correctly protects the LED, which has no built-in current limiting of its own.

How It Works: The Formula and Ohm's Law

An LED drops a roughly constant forward voltage. The series resistor absorbs the difference between the supply and that forward voltage, and that voltage difference across the resistor sets the current. The calculator uses:

R = (supply voltage - LED forward voltage) / (current in mA / 1000)

Dividing the milliamp value by 1000 converts it to amps, because Ohm's law works in volts, amps, and ohms. This is just Ohm's law, R = V / I, where V is the voltage left over after the LED's drop and I is the target current.

Worked Example With Real Numbers

Suppose you want to run a standard red LED from a 5 V supply. A typical red LED has a forward voltage of about 2.0 V, and you want 20 mA through it.

First, find the voltage across the resistor: 5 - 2.0 = 3.0 V. Next, convert the current: 20 mA / 1000 = 0.02 A. Then divide: 3.0 / 0.02 = 150 ohms.

Resistors come in standard values, so round up to the nearest one (such as 150 ohms, or 180 ohms for a small safety margin). Rounding up slightly lowers the current, which is the safe direction.

Check the Resistor Power Rating

Choosing the right resistance is only half the job. The resistor also dissipates heat, and an undersized resistor can overheat. Calculate the power with P = I squared times R, or more simply P = voltage across the resistor times current.

In the example above: 3.0 V x 0.02 A = 0.06 W. A common 0.25 W (quarter-watt) resistor handles this easily. For higher-voltage supplies or higher currents, recalculate, because the power can climb quickly.

Tips and Common Mistakes

Forward voltage varies by LED color and is not always the textbook value. Check the datasheet when accuracy matters.

  • Use the right forward voltage: red and yellow LEDs drop around 1.8-2.2 V, while blue, white, and green LEDs often drop 3.0-3.4 V. Using the wrong value gives the wrong resistor.
  • Stay within the LED's rated current: many small LEDs are rated near 20 mA. Lowering the current (and raising the resistor) is fine and extends LED life with only a small drop in brightness.
  • Always round resistance up to the next standard value, never down, to avoid exceeding the rated current.
  • If the supply voltage is below the LED's forward voltage, the LED will not light no matter the resistor; you need a higher supply.
  • For multiple LEDs, decide first whether they are in series or parallel. This calculator sizes the resistor for one LED at the stated current.

Frequently asked questions

Which standard resistor value should I use?

Round the calculated resistance up to the nearest standard value (e.g. E12 series like 150, 180, 220 Ω). Choosing a higher value slightly reduces brightness but keeps current safely below the LED's rating.

What power rating does the resistor need?

Use the resistor power dissipation output and pick a rating at least 2x that figure. For typical 20 mA indicator LEDs a standard 1/4 W resistor is almost always sufficient.

Where do I find the LED forward voltage and current?

They are listed in the LED datasheet. Common forward voltages are roughly 1.8-2.2 V for red, 3.0-3.4 V for blue/white, and a typical forward current is 20 mA.

What if the supply voltage is below the LED voltage?

The LED will not light because there is not enough voltage to overcome its forward drop. You need a supply voltage higher than the LED forward voltage, or a boost/driver circuit.