LED Resistor Calculator: Formula and Values
To calculate an LED resistor, use R = (Vs − Vf) / I: the supply voltage minus the LED forward voltage, divided by the current you want. For a 1.8 V red LED on 5 V at 10 mA, R = 3.2 V / 10 mA = 320 Ω, rounded up to 330 Ω, the next standard value. The calculator handles LEDs in series, picks the E12, E24 or E96 value, gives the resistor power and shows the current spread over the colour's whole Vf range.
320 Ω
R = (Vs − Vf) / I R = (5 V − 1.8 V) / 10 mA = 320 Ω
Round up to the next standard value: a larger resistor gives less current.
Resistor sizing for indicator LEDs. Vf varies between parts and with temperature: take it from the datasheet at your current. For lighting, or with little headroom, use a constant-current driver.
This calculator sizes an indicator LED, but lighting or a backlight needs a driver, thermal design and margins. Let's talk it through in a free 30-minute audit with our design team.
LED series resistor formula
An LED has an almost fixed forward voltage Vf: above it, its current rises very fast. The series resistor takes up the difference between the supply and the LED and sets the current: R = (Vs − Vf) / I. For n LEDs in series on a single resistor, R = (Vs − n × Vf) / I, as long as n × Vf stays well below Vs.
Once the resistor is rounded up to the next standard value, the real current is I = (Vs − n × Vf) / R and the resistor dissipates P = I² × R. These are the Ohm's law and power relations, applied to the resistor alone.
| Vs | LEDs | Target I | Calculated R | E24 R | Real I |
|---|---|---|---|---|---|
| 5 V | 1 × 2 V | 10 mA | 300 Ω | 300 Ω | 10 mA |
| 5 V | 1 × 1.8 V | 10 mA | 320 Ω | 330 Ω | 9.697 mA |
| 5 V | 3 × 1.2 V | 10 mA | 140 Ω | 150 Ω | 9.333 mA |
| 12 V | 1 × 2 V | 20 mA | 500 Ω | 510 Ω | 19.61 mA |
| 12 V | 3 × 3.1 V | 20 mA | 135 Ω | 150 Ω | 18 mA |
Why you need voltage headroom
The less voltage there is across the resistor, the more the current depends on the LED's real Vf, which varies from part to part and with temperature. Three white LEDs on 12 V with 150 Ω give 26 mA at Vf = 2.7 V but 10 mA at Vf = 3.5 V. Keep at least a volt across the resistor, or move to a constant-current driver for lighting.
FAQ
- What is the formula for an LED resistor?
- R = (Vs − Vf) / I, where Vs is the supply voltage, Vf the LED forward voltage and I the current you want. The resistor takes up the voltage difference and sets the current. Example: 5 V, a 2 V LED and 10 mA give (5 − 2) / 0.010 = 300 Ω. For n LEDs in series, replace Vf with n × Vf.
- Should I round the resistor up or down?
- Up. A larger resistor gives slightly less current, so the LED stays below its maximum. For a calculated 320 Ω, take 330 Ω: the current drops from 10 mA to 9.7 mA, with no visible change in brightness. The calculator picks the next standard value up in the E12, E24 or E96 series you choose.
- What forward voltage (Vf) should I use for each colour?
- The one in the datasheet, at your current. As a guide, red LEDs fall between 1.63 and 2.03 V, yellow between 2.10 and 2.18 V, white between 2.7 and 3.5 V and green anywhere from 1.9 to 4.0 V depending on the technology. The calculator shows the current you get at both ends of the chosen colour's range, which shows why the real value matters.
- Can several LEDs in parallel share one resistor?
- It is not recommended. Forward voltages vary from one LED to the next, and the one with the lowest Vf takes most of the current, heats up and its Vf drops further. Give each LED its own resistor, or put the LEDs in series with a single resistor when the supply voltage allows it.
- What power rating does the resistor need?
- P = I² × R, computed with the standard value you fit. A common rule is to pick a resistor rated for at least twice the dissipation. Example: three 3.1 V white LEDs on 12 V at 20 mA need 135 Ω, rounded up to 150 Ω; the current becomes 18 mA and the resistor dissipates 48.6 mW, so a 0.1 W resistor at least.
- Why is a white LED on 3.3 V a problem?
- Almost nothing is left for the resistor. A 3.1 V white LED on 3.3 V leaves only 0.2 V: the current then depends heavily on the real Vf and on the supply voltage. Across a white LED's 2.7 to 3.5 V range it goes from 30 mA to nothing at all. In that case a constant-current driver is safer than a resistor.
An electronics design house based in Montpellier, France, AESTECHNO brings 10+ years of design experience and a 100% success rate on CE/FCC certifications, across dozens of campaigns run over more than 10 years of practice. Preferred values follow the IEC 60063 E series.