Skip to content

LED Resistor Calculator

Free LED resistor calculator to find the correct current-limiting resistor for any LED circuit. Enter supply voltage, LED forward voltage, and desired current to get the resistor value and power rating needed.

Loading calculator

Preparing LED Resistor Calculator...

Reviewed & Methodology

Every calculator is built using industry-standard formulas, validated against authoritative sources, and reviewed by a credentialed financial professional. All calculations run privately in your browser - no data is stored or shared.

Last reviewed:

Reviewed by:

Written by:

How to Use the LED Resistor Calculator

  1. 1. Enter supply voltage - input the power source voltage (e.g., 5V for USB, 9V for battery, 12V for automotive).
  2. 2. Enter LED forward voltage - input the Vf from the LED datasheet (typically 1.8-2.2V for red, 3.0-3.4V for white/blue).
  3. 3. Enter desired current - input the target LED current in milliamps (typically 20 mA for standard LEDs, 350 mA for power LEDs).
  4. 4. Read the resistor value - the calculator shows the exact resistance needed and the nearest standard resistor value.
  5. 5. Check power rating - verify the resistor wattage and select a resistor rated at least 2x the calculated power dissipation.

LED Resistor Calculator

This calculator determines the correct current-limiting resistor value and power rating for any LED circuit. Enter your supply voltage, LED forward voltage, and desired operating current to find the exact resistance needed, the nearest standard E24 resistor value, and the minimum wattage rating required for safe long-term operation. It works for single LEDs, series strings, and any supply voltage from 3.3V to 24V.

How LED Resistor Calculation Works

The formula is derived from Ohm’s Law applied to the series resistor:

R = (Vsupply - Vf) / I

Where Vsupply is the supply voltage in volts, Vf is the LED forward voltage in volts, and I is the desired forward current in amps. The resistor absorbs the excess voltage and holds current to the target value. The power dissipated as heat in the resistor is:

P = (Vsupply - Vf) x I

Always select a resistor rated at least 2x the calculated power — so a 174 mW result requires a minimum 1/2W (500 mW) resistor, not a standard 1/4W (250 mW) part.

Worked Examples

Example 1 — Red LED on 5V USB supply: Vf = 2.0V, target current = 20 mA. R = (5.0 - 2.0) / 0.020 = 150 ohms exactly — a standard E24 value. P = 3.0 x 0.020 = 60 mW. A 1/4W resistor handles this with plenty of margin.

Example 2 — Blue LED on 9V battery: Vf = 3.2V, target current = 20 mA. R = (9.0 - 3.2) / 0.020 = 290 ohms. The nearest standard E24 value is 300 ohms (yields 19.3 mA — slightly under, which is fine). P = 5.8 x 0.020 = 116 mW. Use a 1/4W resistor.

Example 3 — White LED on 12V automotive supply: Vf = 3.3V, target current = 20 mA. R = (12.0 - 3.3) / 0.020 = 435 ohms. Nearest standard E24 value is 470 ohms (yields 18.5 mA). P = 8.7 x 0.020 = 174 mW. A 1/4W (250 mW) resistor is marginal — use 1/2W for reliable long-term operation.

LED Forward Voltage Reference Table

LED ColorTypical Vf at 20 mAVf RangeNotes
Infrared (IR)1.2V1.0-1.6VRemote controls, sensors
Red2.0V1.8-2.2VMost common general-purpose
Orange2.1V2.0-2.2VIndicators, displays
Yellow2.1V2.0-2.4VIndicators, signal lights
Green (standard)2.1V2.0-2.4VOlder green LEDs
Green (high-brightness)3.3V3.0-3.5VModern bright green LEDs
Blue3.2V3.0-3.5VUses InGaN die
White3.3V3.0-3.5VBlue die + phosphor coating
UV (365-405 nm)3.5V3.2-4.0VCuring, detection

When to Use This Calculator

  • Wiring a status LED to an Arduino, Raspberry Pi GPIO pin (3.3V or 5V logic), or microcontroller
  • Sizing the current-limiting resistor for a 12V or 24V indicator light panel on a vehicle or machine
  • Adding LEDs to a breadboard prototype before moving to a PCB design
  • Calculating the resistor for a series string of two or three LEDs on a higher supply voltage
  • Verifying that an existing circuit uses the correct resistor before a production run

Common Mistakes

  1. Connecting an LED directly to a voltage source with no resistor. An LED has almost no internal resistance once conducting — without a series resistor, current rises until the LED fails. Even a 5-second direct connection to a 5V supply typically destroys the LED. Always place the resistor in series.
  2. Using LED current in mA in the formula without converting to amps. The formula R = (Vsupply - Vf) / I requires I in amps. Dividing (5.0 - 2.0) by 20 gives 0.15 ohms, not 150 ohms. Convert: 20 mA = 0.020 A.
  3. Picking a standard resistor value below the calculated result. A resistor slightly lower than calculated delivers slightly more current, which runs the LED hotter and reduces its lifespan. When the exact calculated value is unavailable, always go up to the next standard E24 value, not down.
  4. Ignoring the resistor power rating on high-voltage supplies. The 1/4W resistors in most hobbyist kits are fine for 5V and 9V supplies, but a 24V supply with a 2.0V red LED dissipates (24 - 2.0) x 0.020 = 440 mW in the resistor — well above 1/4W. Use a 1W resistor or consider a constant-current LED driver.

Real-World Applications

LED resistor calculations appear in every layer of electronics — from the indicator lights on consumer appliance PCBs to the custom lighting drivers in automotive dashboards. PCB designers running LEDs at reduced brightness for long-life applications — status lights meant to last 50,000+ hours — deliberately target 5-10 mA instead of 20 mA; the same resistor formula applies, just with lower current. Industrial machine builders sizing 24V panel indicator lamps use the calculation daily, since 24V driving a 2.0V red LED at 20 mA dissipates 440 mW in the resistor, requiring a larger component than most designers initially anticipate.

Tips

  1. Always use a current-limiting resistor — connecting an LED directly to any voltage source, even briefly, will destroy it immediately.
  2. For multiple LEDs from one supply, wire them in series with a single resistor when supply voltage allows — this ensures equal current and eliminates per-LED resistors.
  3. When wiring LEDs in parallel, give each its own resistor — small differences in Vf between LEDs cause current imbalance, and the LED with the lowest Vf draws all the current and fails first.
  4. Choose the next higher standard E24 resistor value when the exact calculated resistance is unavailable — slightly less current is always safer than slightly more for LED longevity.
  5. For supply voltages that vary (like an automotive 12V system that swings 11-14.4V), calculate the resistor for the maximum voltage to prevent overcurrent at peak supply.
  6. For power LEDs rated 1W and above, use a dedicated constant-current LED driver IC instead of a resistor — resistors waste significant power and cannot regulate current as supply voltage fluctuates.

Frequently Asked Questions

What is forward voltage and how do I find it for my LED?
Forward voltage (Vf) is the voltage drop across an LED when it is conducting. It varies by LED color: red LEDs are typically 1.8-2.2V, yellow/green are 2.0-2.4V, blue and white LEDs are 3.0-3.4V. Check the LED's datasheet for the exact Vf at your desired current. If no datasheet is available, use these typical values as starting points.
How do I calculate the current-limiting resistor for an LED?
Use Ohm's Law: R = (Vsupply - Vf) / I, where Vsupply is your power source voltage, Vf is the LED forward voltage, and I is the desired current. For a red LED (Vf = 2.0V) at 20 mA on a 5V supply: R = (5 - 2) / 0.020 = 150 ohms. Always pick the next standard value up (in this case, 150 ohms is a standard E24 value). The resistor power is P = (Vsupply - Vf) x I = 0.06W, so a 1/4W resistor works fine.
Should I wire LEDs in series or parallel?
Series is preferred when your supply voltage is high enough to accommodate all the LED voltage drops. Three red LEDs (Vf = 2V each) in series need 6V plus resistor drop -- perfect for a 9V or 12V supply. Series ensures equal current through all LEDs. Parallel LEDs each need their own resistor to prevent current hogging, since slight Vf differences cause one LED to draw more current than others.
How do I read LED specifications from a datasheet?
Key LED specs include: forward voltage Vf (voltage drop at rated current), maximum continuous current If (typically 20 mA for standard LEDs), peak current (brief pulses only), viewing angle (how wide the beam spreads), and luminous intensity in millicandelas (mcd). Also check the absolute maximum ratings -- exceeding Vf or If will destroy the LED. Power LEDs (1W+) also list thermal resistance and require heatsinking.
How do I select the right resistor power rating?
Calculate resistor power as P = (Vsupply - Vf) x I. For a 12V supply with a white LED (Vf = 3.2V) at 20 mA: P = (12 - 3.2) x 0.020 = 0.176W. Always select a resistor rated at least 2x the calculated wattage for reliability, so use a 1/2W resistor. Standard through-hole resistors come in 1/8W, 1/4W, 1/2W, 1W, and 2W ratings. For high-power LED circuits, you may need 1W or 2W resistors or dedicated LED driver ICs.
Calculators