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
Ω

For educational and reference use only. Always verify results before use in real-world designs or safety-critical applications. For more information, see Calculation Assumptions and Disclaimer.

How to Use This LED Resistor 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.

LED Resistor 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

Frequently Asked Questions

What resistor do I need for a 5V Arduino and a standard red LED?
A red LED typically has a forward voltage of around 2.0V and runs at 20 mA. Using the formula: R = (5 − 2.0) / 0.020 = 150 Ω. Use a 150 Ω or the next standard value up, 180 Ω, to be safe.

What happens if I don't use a current-limiting resistor with an LED?
Without a resistor, the only thing limiting current through the LED is its own internal resistance, which is very low. The current will spike far beyond the LED's rated limit, causing it to burn out almost instantly — and potentially damaging the driving circuit too.

Where do I find the forward voltage for my LED?
The forward voltage (Vf) is listed on the LED's datasheet. As a rough guide: red and yellow LEDs are typically 1.8V–2.2V, green around 2.0V–3.0V, blue and white 3.0V–3.5V. When in doubt, use the datasheet value rather than a guess.

Should I round up or down to the nearest standard resistor value?
Always round up to the next standard resistor value (e.g. E24 or E12 series). Rounding up increases the resistance slightly, which reduces current — keeping the LED within its safe operating range. Rounding down would push more current through than intended.

Can I use one resistor for multiple LEDs wired in parallel?
It's not recommended. Small differences between LEDs mean current won't split evenly, causing some to be over-driven and others under-driven. The correct approach is to give each LED its own individual resistor.