Free LED Resistor Calculator
Calculate the correct series resistor for an LED from your supply voltage, the LED's forward voltage and your target current — plus the power the resistor must dissipate so you can pick a safe wattage.
Enter your supply voltage, the LED forward voltage and the target current to size the series resistor.
R = (Vs − Vf) / I · P = (Vs − Vf) · I. Current is converted from mA to amperes automatically. Round R up to the nearest standard value and pick a resistor rated at least 2× the power shown.
Quick answer
Size an LED series resistor with R = (Vs − Vf) / I, where Vs is the supply voltage, Vf is the LED forward voltage, and I is the LED current in amperes. For a 5 V supply driving a 2 V LED at 20 mA (0.02 A), R = (5 − 2) / 0.02 = 150 Ω, and the resistor dissipates P = (Vs − Vf) · I = 3 × 0.02 = 0.06 W, so a standard 1/4 W resistor is fine.
Formula & method
R = (Vs − Vf) / I
- R — Required series resistance (Ω)
- Vs — Supply / source voltage (V)
- Vf — LED forward voltage drop (V)
- I — Desired LED current (A)
Series resistor value in ohms. I must be in amperes — divide milliamps by 1000 first (20 mA = 0.02 A).
P = (Vs − Vf) · I
- P — Power in the resistor (W)
Power dissipated in the resistor (watts). Pick a resistor rated at least 2× this for headroom.
Examples
- Input
- Vs = 5 V, Vf = 2 V, I = 20 mA
- Result
- R = 150 Ω, P = 0.06 W
- Why
- Convert current: 20 mA = 0.02 A. R = (5 − 2) / 0.02 = 3 / 0.02 = 150 Ω. Power P = 3 × 0.02 = 0.06 W, well under a 1/4 W (0.25 W) resistor's rating.
- Input
- Vs = 12 V, Vf = 2 V, I = 20 mA
- Result
- R = 500 Ω, P = 0.2 W
- Why
- I = 0.02 A. R = (12 − 2) / 0.02 = 10 / 0.02 = 500 Ω; use the next standard value, 510 Ω. Power P = 10 × 0.02 = 0.2 W, so a 1/4 W resistor is marginal — choose 1/2 W for safety.
- Input
- Vs = 9 V, Vf = 3.2 V, I = 20 mA
- Result
- R = 290 Ω, P = 0.116 W
- Why
- I = 0.02 A. R = (9 − 3.2) / 0.02 = 5.8 / 0.02 = 290 Ω; the nearest standard value is 300 Ω. Power P = 5.8 × 0.02 = 0.116 W — a 1/4 W resistor is fine.
- Input
- Vs = 5 V, Vf = 3.4 V, I = 10 mA
- Result
- R = 160 Ω, P = 0.016 W
- Why
- I = 0.01 A. R = (5 − 3.4) / 0.01 = 1.6 / 0.01 = 160 Ω (a standard E12 value). Power P = 1.6 × 0.01 = 0.016 W, trivially within a 1/4 W resistor.
When to use this tool
- Choosing the current-limiting resistor for a single LED on a fixed DC supply (5 V, 9 V, 12 V, etc.).
- Checking that an existing resistor keeps an LED within its rated current and that the resistor's wattage is adequate.
- Prototyping on a breadboard or designing a PCB and you need the nearest standard resistor value plus a safe power rating.
- Teaching or learning Ohm's law in a real circuit, where the LED's forward voltage drop must be subtracted before dividing by current.
Common mistakes
- Entering current in milliamps instead of amperes. The formula needs I in amperes — 20 mA is 0.02 A, not 20. The calculator already does this conversion for you when you type the value in the mA field.
- Using the supply voltage instead of the voltage across the resistor for power. The resistor only drops Vs − Vf, so P = (Vs − Vf) · I, not Vs · I. Using Vs overstates the dissipation.
- Picking a resistor rated exactly at the calculated power. Wattage ratings are maximums; choose at least 2× the dissipation (e.g. a 1/2 W part for a 0.2 W load) to keep it cool and reliable.
- Trying to drive an LED when Vf ≥ Vs. If the forward voltage equals or exceeds the supply, no series resistor can light the LED at the rated current — you need a higher supply or a boost driver.
Frequently asked questions
How do I calculate the resistor for an LED?
Use R = (Vs − Vf) / I. Subtract the LED's forward voltage (Vf) from your supply voltage (Vs), then divide by the LED current in amperes. For example, a 5 V supply, a 2 V red LED and 20 mA give R = (5 − 2) / 0.02 = 150 Ω. Round up to the nearest standard value.
Why does an LED need a series resistor?
An LED's current rises steeply once it passes its forward voltage, so a tiny voltage increase can push huge current and burn it out. A series resistor limits the current to a safe value by dropping the difference between the supply and the LED's forward voltage, giving the circuit a stable, predictable operating point.
What forward voltage should I use for my LED?
Use the value from the LED datasheet. Typical figures are about 1.8–2.2 V for red, 2.0–2.2 V for yellow/green, and 3.0–3.4 V for blue and white LEDs. If unsure, the default of 2 V is a safe starting point for red LEDs; measure or check the datasheet for accuracy.
What current should I run my LED at?
Standard indicator LEDs are usually run at 20 mA, which this calculator uses by default. Many modern LEDs are bright at 5–10 mA, which saves power and runs cooler. Never exceed the maximum forward current on the datasheet; a lower current simply makes the LED dimmer.
What power rating should the resistor have?
The resistor dissipates P = (Vs − Vf) · I watts. For most small-signal LEDs this is well under 0.1 W, so a common 1/4 W (0.25 W) resistor works. As a rule pick a part rated at least twice the calculated power; this calculator shows the exact dissipation so you can choose.
What if the calculated resistor isn't a standard value?
Resistors come in fixed series (E12/E24), so round up to the next standard value. Rounding up slightly lowers the current, which is safe for the LED. For 290 Ω use 300 Ω; for 500 Ω use 510 Ω. A small change in resistance only dims the LED a little.
Sources & references
- Wikipedia — Light-emitting diode (operating circuit)
- HyperPhysics — Ohm's Law
- SparkFun — Light-Emitting Diodes (LEDs)
External references open in a new tab. We are independent and not affiliated with these organizations.
- ✓ Free to use
- ✓ No sign-up required
- ✓ Runs entirely in your browser — nothing is uploaded.
- ✓ Formula and method shown above
Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.
Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.
Related tools
- Ohm's Law CalculatorScience & Engineering
- Resistor Color Code CalculatorScience & Engineering
- Voltage Divider CalculatorScience & Engineering
- Parallel Resistance CalculatorScience & Engineering
- Power Dissipation CalculatorScience & Engineering
Embed this tool on your site
Free to embed, no sign-up. Paste this code where you want the led resistor calculator to appear: