LED Resistor Calculator
Calculate the exact current-limiting resistor value needed to safely power an LED from any supply voltage. Use this whenever wiring LEDs to avoid burning them out from excess current.
About this calculator
LEDs are current-driven devices with very low internal resistance, so without a series resistor they draw excessive current and quickly fail. The required resistor value is found using Ohm's Law applied to the voltage drop across the resistor: R = (V_supply − V_forward) / I_LED. Here, V_supply is the supply voltage, V_forward is the LED's forward voltage drop (typically 1.8–3.3 V depending on colour), and I_LED is the desired LED current in amperes. Because LED current is usually specified in milliamps, the formula divides by 1,000 to convert: R = (V_supply − V_LED) / (I_LED (mA) / 1000). The result is in ohms (Ω). You should select the nearest standard resistor value at or above the calculated result to ensure the LED current stays within its rated limit.
How to use
You want to power a red LED (forward voltage 2.0 V, rated current 20 mA) from a 5 V supply. Step 1 — Enter 5 as supply voltage. Step 2 — Enter 2.0 as LED forward voltage. Step 3 — Enter 20 as LED current in mA. Step 4 — The calculator computes: R = (5 − 2.0) / (20 / 1000) = 3.0 / 0.02 = 150 Ω. Select a standard 150 Ω or 180 Ω resistor. At 150 Ω the LED draws exactly 20 mA; at 180 Ω it draws about 16.7 mA — still well within spec and slightly extending LED life.
Frequently asked questions
What forward voltage should I use for different coloured LEDs when calculating the resistor value?
Forward voltage varies by LED colour due to the different semiconductor materials used. Typical values are: red and yellow LEDs — 1.8 to 2.2 V; green LEDs — 2.0 to 2.4 V; blue and white LEDs — 3.0 to 3.5 V. These are approximate; always check the datasheet for your specific LED model to get the exact V_f at your intended operating current. Using an incorrect forward voltage will result in the wrong resistor value and either under- or over-driving the LED.
Why does an LED need a current-limiting resistor in the first place?
An LED's voltage-current relationship is exponential rather than linear — a tiny increase in voltage above the forward voltage causes a dramatic surge in current. Without a resistor to limit current, the LED will quickly exceed its maximum rated current, overheat, and permanently fail, often within seconds. The resistor absorbs the excess voltage (V_supply − V_forward) and limits current to the safe operating level defined by Ohm's Law. Some specialised LED driver ICs regulate current electronically, but a simple series resistor remains the most common and cost-effective solution for basic circuits.
How do I calculate the resistor wattage rating needed for an LED circuit?
Once you know the resistor value (R) and the LED current (I), calculate the power dissipated by the resistor using P = I² × R. For the example above: P = (0.02)² × 150 = 0.06 W. Always choose a resistor with a power rating of at least twice the calculated dissipation as a safety margin — so a standard 1/4 W (0.25 W) resistor is more than adequate for most LED circuits running at 20 mA or less. For high-power LEDs drawing hundreds of milliamps, this calculation becomes critical to prevent the resistor from overheating.