Quick Answer
R = (supply − forward voltage) ÷ current. One LED with a 2.0 V forward voltage at 20 mA on 5 V needs (5 − 2) ÷ 0.020 = 150 Ω; the next standard value is 150 Ω, giving 20.0 mA and 60 mW in the resistor.
Embed this calculator
Adjust the size if needed, then copy the code below into your page or blog. The calculator will load in an iframe and stay updated automatically.
Table of Contents
- LED Resistor Calculator
- Quick Answer
- Related Calculators
- How This LED Resistor Calculator Works
- How to Use the LED Resistor Calculator
- Core Formulas
- Key Terms
- Worked Example
- Real-Life Examples
- Resistor vs Constant-Current Driver
- Resistors for a 20 mA LED
- Design Tips
- Common Mistakes to Avoid
- Frequently Asked Questions
- References & Sources
How This LED Resistor Calculator Works
An LED needs a fixed current, and the simplest way to set it is a resistor in series. The resistor takes up the difference between the supply voltage and the LED’s forward voltage, so by Ohm’s law its value is that leftover voltage divided by the current you want. Enter the supply, the LED’s forward voltage and current from its datasheet, and how many LEDs share the string. You get the exact resistance, the next standard value up, the real current with it, and the power the resistor will dissipate.
Makers build many small circuits; save each one by name so the next project starts with known values.
Quick explanation:
- R: (supply − LEDs × forward voltage) ÷ current.
- Round up: to a standard value, so current stays below target.
- Power: current² × R; pick a resistor rated above it.
How to Use the LED Resistor Calculator
- Enter the supply voltage.
- Enter the LED forward voltage and current from its datasheet.
- Enter how many LEDs are in series in the string.
- Press Calculate for the resistor, standard value and power.
- Save the circuit for later.
Core Formulas
- Voltage across the resistor: VR = Vsupply − n × Vf
- Resistance: R = VR ÷ I (I in amps: mA ÷ 1,000)
- Standard value: next E12 value at or above R
- Actual current: I = VR ÷ Rstandard
- Resistor power: P = I² × R
Key Terms
- Forward voltage (Vf): the voltage an LED drops when it conducts.
- Forward current (If): the current an LED is designed to run at.
- Series resistor: a resistor in line with the LED to limit current.
- E12 series: standard resistor values, 12 per decade.
- Dissipation: power turned into heat in the resistor.
Worked Example
Three white LEDs (3.0 V each) in series on a 12 V supply at 20 mA.
- Voltage left = 12 − 3 × 3.0 = 3 V
- R = 3 ÷ 0.020 = 150 Ω; next E12 value 150 Ω
- Current = 3 ÷ 150 = 20.0 mA; resistor power = 60 mW
Real-Life Examples
- One red LED on a 5 V board at 20 mA (Vf 2.0 V): 150 Ω exact, 150 Ω standard.
- Three white LEDs on 12 V at 20 mA: 150 Ω.
- Indicator on 3.3 V at 10 mA (Vf 2.0 V): 130 Ω exact, 150 Ω standard.
- Two blue LEDs on 9 V at 15 mA (Vf 3.2 V): 173 Ω exact, 180 Ω standard.
Resistor vs Constant-Current Driver
- Series resistor: cheap and simple for indicator LEDs; wastes some power as heat.
- Constant-current driver: regulates the current; used for lighting and high-power LEDs.
- Choice: small currents, resistor; watts of LED power, driver.
Resistors for a 20 mA LED
| Supply | Vf 2.0 V | Vf 3.0 V |
|---|---|---|
| 3.3 V | 65 Ω → 68 Ω | 15 Ω → 15 Ω |
| 5 V | 150 Ω → 150 Ω | 100 Ω → 100 Ω |
| 9 V | 350 Ω → 390 Ω | 300 Ω → 330 Ω |
| 12 V | 500 Ω → 560 Ω | 450 Ω → 470 Ω |
| 24 V | 1100 Ω → 1200 Ω | 1050 Ω → 1200 Ω |
Design Tips
- Use the datasheet: forward voltage depends on the LED’s material and color, and on current.
- Leave headroom: if the supply is barely above the LEDs’ total forward voltage, small changes in supply cause big changes in current.
- One resistor per string: parallel strings each need their own resistor.
- Resistor rating: choose a power rating comfortably above the calculated power.
- Efficiency: the resistor turns its share of power into heat; for high-power LEDs, constant-current drivers are used instead.
Common Mistakes to Avoid
- Guessing the forward voltage. Read the datasheet.
- Rounding down the resistor. That raises the current above target.
- Sharing one resistor between parallel LEDs. Give each string its own resistor.
- Ignoring resistor power. Check the wattage.
- Too many LEDs in series. The supply must be above the total forward voltage.
Frequently Asked Questions
(Supply − forward voltage) ÷ current. For 5 V, 2 V and 20 mA: 150 Ω.
Depends on the LED; for one 2 V LED at 20 mA, (12 − 2) ÷ 0.02 = 500 Ω, so 560 Ω standard.
Not with a plain voltage source; something must limit the current.
Subtract all forward voltages from the supply, then divide by the current.
Up, so the current stays at or below the target.
Above I² × R; the calculator shows the power.
In the LED’s datasheet.
Yes. Save each one by name.
Standard resistor values: 1.0, 1.2, 1.5, 1.8, 2.2, 2.7, 3.3, 3.9, 4.7, 5.6, 6.8, 8.2 times powers of ten.
Give each LED or string its own resistor.
Calculate each color separately with its own forward voltage.
Yes. Use Compare: keep as A.
Use a constant-current driver.
Yes. Press Print.
References & Sources
| Source | Used For | Link |
|---|---|---|
| Wikipedia, LED circuit | Basic series-resistor circuit; Ohm’s and Kirchhoff’s laws give the resistor value; forward voltage depends on material. | https://en.wikipedia.org/wiki/LED_circuit |
| Wikipedia, E series of preferred numbers | E12 resistor values. | https://en.wikipedia.org/wiki/E_series_of_preferred_numbers |