LED Resistor Calculator

Calculate the correct resistor value for your LED circuit. Enter supply voltage, LED forward voltage, and current to find the ideal resistor with this free online calculator.

How to Use

  1. Enter supply voltage

    Input the supply voltage (V) powering your circuit.

  2. Enter LED specs

    Input the LED forward voltage (Vf) and rated current (mA).

  3. View results

    Click Calculate to see the required resistance and the nearest standard resistor value.

What is an LED series resistor?

An LED (light-emitting diode) is a nonlinear device: once the voltage exceeds its forward voltage (Vf), the current rises exponentially. Because an LED cannot limit its own current, connecting it directly to a power source lets excessive current flow and burns it out almost instantly.

To prevent this, a current-limiting resistor wired in series with the LED is called an LED series resistor. It absorbs the difference between the supply voltage and the LED's forward voltage (the excess voltage), holding the LED current at its rated value (typically 20 mA).

Where it's used

  • Power indicators, status LEDs and other simple lighting circuits
  • Connecting an LED to an Arduino or Raspberry Pi GPIO pin
  • Current design for LED strips, signs and stage lighting

Formula

Derived from Ohm's law, the LED series resistor formula is:

R = (Vs - Vf) / If

  • Vs: supply (source) voltage (V)
  • Vf: LED forward voltage (V)
  • If: LED forward current (A) — divide mA by 1000 to convert

For example, connecting a red LED with Vf 2 V and If 20 mA to a 5 V supply gives R = (5 - 2) / 0.02 = 150 Ω. The resistor's power dissipation is P = (Vs - Vf) × If = 3 V × 0.02 A = 0.06 W, so a 1/4 W (0.25 W) resistor is more than enough.

Frequently Asked Questions

Why does an LED need a resistor?
An LED has no current-limiting ability, so excessive current damages it immediately. A series resistor limits the current to a safe level and protects the LED. Use the formula R = (Vs - Vf) / If to calculate the required resistance.
How do I find the LED forward voltage (Vf)?
The most accurate source is the LED's datasheet. As rough values, red is about 2 V, yellow and green about 2.1–2.2 V, and blue and white about 3.0–3.5 V. The shorter the wavelength (color), the higher the Vf.
What is the E24 standard resistor series?
E24 is a series of 24 base resistor values defined by the IEC 60063 standard: 10, 11, 12, 13, 15, 16, 18, 20, 22, 24, 27, 30, 33, 36, 39, 43, 47, 51, 56, 62, 68, 75, 82, 91, along with their decade multiples (×10, ×100, ×1k, ×10k). These are the values actually available to buy in stores.
What happens if too much current flows through the LED?
Excessive current overheats the LED, shortening its life or destroying it instantly. A typical indicator LED is rated at 20 mA, while high-brightness LEDs allow higher currents. Always stay at or below the maximum forward current stated in the datasheet.
Can I use a resistor different from the calculated value?
Using a resistor larger than the calculated value reduces the current and makes the LED slightly dimmer, but it is safe. So when you do not have an exact value, choosing the next higher E24 standard value is the safe option. A resistor smaller than the calculated value risks overcurrent and should be avoided.
Why does the resistor's power rating (watts) matter?
The resistor dissipates the excess voltage it absorbs as heat. Calculate it with P = (Vs - Vf) × If; if this exceeds the resistor's power rating, the resistor burns out. For safety margin, choose a rating at least twice the calculated dissipation (e.g. a 1/4 W resistor for 0.06 W).
How do I calculate the resistor when connecting several LEDs?
For a series connection, add up the Vf of every LED and put the total in the Vf slot of the formula, using a single resistor (the summed Vf must be lower than Vs). For a parallel connection, a separate resistor per LED is recommended. Tying parallel LEDs to one resistor lets part-to-part variation push the current onto one branch.
What if the supply voltage is almost equal to the LED forward voltage?
If the difference between Vs and Vf is too small, (Vs - Vf) becomes tiny, the required resistance becomes very small, and the current swings wildly with voltage fluctuations, making it unstable. As a rule, keeping Vs at least 1–2 V above Vf gives a stable design.
2026 physical constants

Related Calculators