LED Resistor Calculator
Calculate the series resistor needed to safely drive an LED from a given supply voltage.
R = (Vs − Vf) ÷ If
Quick-fill from a common LED type:
Selecting a preset fills in the Vf and If fields. Adjust as needed for your specific LED datasheet values.
R = (Vs − Vf) ÷ If | P = (Vs − Vf) × IfWhy Do LEDs Need a Series Resistor?
LEDs are current-driven devices with a non-linear voltage–current characteristic. Unlike a resistor, a small increase in voltage beyond the LED's forward voltage (Vf) causes an exponentially large current to flow. Without a series resistor to limit this current, the LED will quickly overheat and fail.
The series resistor converts excess supply voltage into a safe voltage drop, keeping the LED current at or below its rated forward current (If). Choosing the correct resistor value extends LED life and ensures consistent brightness.
The LED Resistor Formula
The resistance is calculated using Ohm's Law applied to the voltage remaining after the LED drop:
R = (Vs − Vf) ÷ If
- Vs — supply voltage (e.g. 5 V from a microcontroller GPIO, 12 V from a power rail)
- Vf — LED forward voltage, found in the datasheet (typically 1.8–2.2 V for red/yellow/green, 3.0–3.4 V for blue/white)
- If — desired forward current (typically 10–30 mA for standard through-hole LEDs, 1–5 mA for low-power indicators)
Multiple LEDs in Series
When multiple LEDs are wired in series, each LED drops its own Vf. The total voltage drop is n × Vf, so the formula becomes:
R = (Vs − n × Vf) ÷ If
Ensure the supply voltage is greater than the combined forward voltages. For example, three 3.3 V LEDs in series require at least ~10 V supply to operate correctly.
E24 Standard Resistor Values
Resistors are manufactured in standardised value series (E12, E24, E48, E96). This calculator recommends the nearest E24 value that is greater than or equal to the exact calculated resistance. Using a higher-than-exact value is intentional — it slightly reduces LED current below the rated maximum, which is safe and extends LED longevity.
Power Dissipation
The series resistor must be rated to handle the power it dissipates. Power is calculated as P = (Vs − Vf) × If. For most low-power LED circuits (5V, 20mA, 2V LED) this is only 60 mW — well within the rating of a standard ¼W (250 mW) resistor. Always choose a resistor rated to at least twice the calculated dissipation for thermal margin.
Related Tools
- Ohm's Law CalculatorSolve for voltage, current, resistance or power given any two values.Open tool
- Voltage Divider CalculatorCalculate output voltage from two resistors and an input voltage.Open tool
- Current Divider CalculatorCalculate branch currents through parallel resistors.Open tool
- Resistor Colour Code DecoderDecode 4, 5 and 6-band resistor colour codes to resistance values.Open tool