Skip to main content
HSCalculadora

LED Resistor Calculator

Find the series resistor for an LED circuit.

V
V
mA

Results update as you type.

Resistor value
—
Resistor power—

How it works

An LED needs a series resistor to limit current and prevent it from burning out, and this calculator finds the correct resistor value and its power rating. You enter the supply voltage, the LED's forward voltage, and the desired current in milliamps, and it returns the required resistance in ohms and the power the resistor will dissipate. The principle is Ohm's law: the LED drops its forward voltage, so the resistor must drop the remaining voltage, the supply minus the LED voltage, at the chosen current. Dividing that voltage difference by the current in amps gives the resistance. LEDs are current-driven devices with a nearly fixed forward voltage, so without a resistor even a small excess voltage causes a large, destructive current. A typical indicator LED runs at around 20 milliamps and has a forward voltage of about 2 volts, though this varies by color and type. The calculator also gives the power dissipated in the resistor, which matters because you must choose a resistor rated above this value, with margin, or it will overheat. In practice, pick the nearest standard resistor value at or above the calculated resistance. Use this for hobby electronics, indicator lights, and circuit design. Enter your supply voltage, LED voltage, and current to size the resistor.

Formula

R = (V_supply − V_LED) / I

The series resistor value equals the supply voltage minus the LED's forward voltage, divided by the desired current in amperes. The voltage the resistor must drop is whatever the LED does not use, and Ohm's law gives the resistance. The power dissipated in the resistor is that voltage drop times the current, which sets the minimum power rating.

Source:Electronics (Ohm's law)

We review all our tools from time to time to ensure accuracy.

Worked example

Supply voltage:12LED forward voltage:2LED current:20
(12 − 2) / 0.02 = 500 Ω, dissipating 10 V × 0.02 A = 0.2 W.

How to use this calculator

  1. 1

    Enter your values

    Enter supply voltage, led forward voltage and led current.

  2. 2

    Adjust the options

    Fine-tune any options to match your situation.

  3. 3

    Read your result

    Resistor value updates instantly as you type — no button to press.

Frequently asked questions

How do I calculate an LED resistor?

Subtract the LED's forward voltage from the supply voltage, then divide by the desired current in amperes. For a 12-volt supply, a 2-volt LED, and 20 milliamps, that is (12 − 2) / 0.02 = 500 ohms. The calculator returns this resistance and the power the resistor must handle when you enter the three values.

Why does an LED need a resistor?

LEDs have a nearly constant forward voltage and draw current that rises steeply with any extra voltage. Without a current-limiting resistor, even a slightly higher supply voltage sends a large, destructive current through the LED, burning it out almost instantly. The series resistor drops the excess voltage and holds the current at a safe level.

What forward voltage should I use?

Forward voltage depends on the LED's color and type. Red LEDs are around 1.8 to 2.2 volts, yellow and green a bit higher, and blue and white often 3 to 3.4 volts. Check your LED's datasheet for the exact value at your target current, and enter it, since using the wrong figure gives the wrong resistor.

What power rating should the resistor have?

The resistor must be rated above the power it dissipates, which is the voltage it drops times the current. The calculator shows this power. Choose a resistor rated at least twice the calculated power for a safe margin, so a 0.2-watt dissipation suits a common quarter-watt or half-watt resistor comfortably.

What if the exact resistance is not a standard value?

Standard resistors come in fixed values, so pick the nearest standard value at or above your calculated resistance. Going slightly higher reduces the current a little, which is safe for the LED, while going lower increases current and risk. Rounding up to the next standard value is the safe, common practice.