OctaCalc / LED Resistor Calculator

LED Resistor Calculator

Find the correct current-limiting resistor for any LED by entering your supply voltage, LED forward voltage, and desired current.

Resistor Value
Ω

How to Use This Calculator

Enter your supply voltage (e.g. 5V for Arduino, 12V for a car circuit), your LED's forward voltage (found on the datasheet — typically 1.8V–3.5V), and your desired current (20 mA is standard for most through-hole LEDs). Click Calculate Resistor to get the result.

Formula

The LED resistor formula is derived from Ohm's Law, subtracting the voltage drop across the LED from the supply:

R = (Vs − Vf) / I

Where Vs = supply voltage, Vf = LED forward voltage, and I = current in amps.

Example

Scenario: 5V Arduino powering a red LED (Vf = 2.0V) at 20 mA
R = (5 − 2.0) / 0.020
R = 3.0 / 0.020
R = 150 Ω → use a 150 Ω or 180 Ω resistor