LED Resistor Calculator
The series resistor for one LED or a string of them, from the supply voltage and the forward voltage and current on the LED’s datasheet, rounded up to a standard value.
Result
Enter led forward voltage, vf and led forward current, if to see the result.
https://calcgallery.com/electronics/led-resistor-calculator/
Results come from the published equations applied to the values you enter. They are not electrical design, conductor sizing, laboratory safety or medical guidance. Weather indices describe a standard person in standard conditions and are not a forecast. Where codes apply, local rules vary and must be checked. Read the full disclaimer
How to use the LED Resistor Calculator
- Enter the supply voltage.
- Enter the LED's forward voltage and the current you want, both from its datasheet, and how many LEDs share the one resistor in series.
- Read the next standard value up, which is the resistor to fit, then the exact resistance and the current and power with that standard resistor fitted.
The formula
voltage across the resistor = supply − number of LEDs × VfR = (supply − n × Vf) ÷ Ifcurrent with the standard value = (supply − n × Vf) ÷ R standardresistor power = current² × R standard
The standard value is the smallest E12 or E24 preferred value at or above the exact resistance, the same series the resistor colour code page uses.
Limits
The forward voltage is taken as fixed at the current entered. In a real LED it rises slightly with current and falls as the LED warms, so the actual current will differ a little from the figure shown. If the LEDs’ forward voltages reach the supply voltage, no resistor can work and the page says so. The resistor power is shown so you can compare it with a resistor’s rating; the page does not choose the rating for you.
With your numbers
- Voltage across the resistor = 9 V − 1 × 2.1 V = 6.9 V
- R = 6.9 V ÷ 0.02 A = 345 Ω
Quick reference
Vf and If vary between parts. Check the current in the finished circuit, and choose a resistor rated for its power.
| Example | Next standard value up |
|---|---|
| 5 V supply, one LED at 2.0 V, 20 mA | 150 Ω |
| 9 V supply, one LED at 2.1 V, 20 mA | 390 Ω |
| 9 V supply, one LED at 2.1 V, 20 mA, E24 | 360 Ω |
| 12 V supply, three LEDs at 3.2 V, 20 mA | 120 Ω |
| 3.3 V supply, one LED at 3.2 V, 20 mA | 5.6 Ω |
| 24 V supply, one LED at 2.0 V, 10 mA | 2.2 kΩ |
Common questions about the LED Resistor Calculator
- Why does an LED need a resistor?
- An LED holds its voltage almost constant once it conducts, so a small rise in supply voltage causes a large rise in current. The resistor takes up the difference between the supply and the LED and sets the current. Without one, the current is limited only by the supply and the wiring.
- Where do the forward voltage and current come from?
- From the datasheet of the LED you are using. Forward voltage depends on the colour and the part, from under 2 V for many red LEDs to over 3 V for many blue and white ones, and the rated current varies too. The page has no default for either, because a guessed value gives a wrong resistor.
- Why round up rather than to the nearest value?
- A larger resistor lets through less current, never more, so rounding up keeps the LED at or below the current you asked for. With 9 V, a 2.1 V LED and 20 mA, the exact value is 345 Ω; the next E12 value up, 390 Ω, gives about 17.7 mA.
- Can several LEDs share one resistor?
- In series, yes: the same current flows through each, and their forward voltages add, which is what the LEDs-in-series field does. Three LEDs at 3.2 V on 12 V leave 2.4 V for the resistor, 120 Ω at 20 mA. LEDs in parallel on one resistor do not share current evenly, so each parallel branch needs its own resistor.