anındahesapla

LED resistor calculator

Finds the series resistor an LED needs from the supply voltage, the LED's forward voltage and current.

· Updated:

WhatsApp X Facebook

Required resistance: 150 Ω. An LED with a forward voltage of 2 V running at 20 mA from a 5 V supply needs this resistor in series. That resistor turns 0.06 W into heat.

LEDs burn out quickly without a current limit, because a small rise in voltage causes a large rise in current. Hobby electronics, indicator lights on control panels and LED strips on custom builds all start with this step. Getting it right makes the LED last and keeps brightness stable.

V
V
mA

Result

150 Ω

Required resistance: 150 Ω

R = (Vs − Vled) / I

Why an LED needs a resistor

A light-emitting diode drops a nearly fixed voltage across itself when it conducts. Red LEDs drop less, blue and white ones more. A datasheet lists this forward voltage and the recommended current.

Above that voltage the diode conducts almost freely. Connected straight to a battery or a power rail, it would draw far more current than it can handle. A series resistor absorbs the excess voltage and sets the current.

Ohm's law gives the value. Whatever voltage remains for the resistor is the supply voltage minus the LED drop. Dividing it by the target current, in amperes, gives the resistance in ohms.

Resistors come in standard values. When the calculated value falls between two, pick the next higher one. Your LED then runs a little dimmer and a little cooler, which is the safe side.

Power rating deserves the same attention as resistance. Its voltage drop times the current is turned into heat. A part rated for at least twice the calculated wattage stays cool and lasts longer.

Several LEDs can share one resistor when wired in series, with their drops added together. LEDs wired in parallel should each get their own resistor, since small differences between diodes make one hog the current.

Microcontroller pins can drive small LEDs directly but have their own current limit per pin and per chip. Such a resistor protects the pin as much as the LED, and its value is chosen so both limits are respected.

How to calculate

Resistance = (supply voltage − LED voltage) ÷ current. Power = (supply voltage − LED voltage) × current.

  1. Enter the supply voltage.
  2. Enter the LED forward voltage from the datasheet.
  3. Enter the LED current in milliamps.
  4. Read the resistance and the resistor power.
Input or resultValue
Supply voltage5 V
LED voltage2 V
LED current20 mA
Resistance150 Ω
Resistor power0.06 W

The worked line is (5 − 2) ÷ 0.02. Milliamps are converted to amps before dividing, which is where most hand calculations go wrong.

Battery-powered circuits see their supply drop as cells drain. Calculating with the fresh battery voltage keeps current within limits at the start, and the LED dims as the battery ages.

Frequently Asked Questions

Where do I find the LED's forward voltage?
In the datasheet. Colour gives a rough idea: red is lower, blue and white are higher.
What if no standard resistor has that value?
Use the next higher standard resistor. The LED runs slightly dimmer and safer.
Can one resistor serve several LEDs?
Yes for LEDs in series, with their voltages added. Parallel LEDs need one resistor each.
What wattage resistor should I buy?
At least twice the calculated power, so it stays cool.
Why convert milliamps?
Ohm's law uses amperes. Leaving the value in milliamps gives a result a thousand times too small.

Related calculations