What Is the LED Series Resistor Calculator?
An LED (light-emitting diode) needs a current-limiting resistor in series to prevent it from drawing too much current and burning out. This calculator works out the exact resistor value in ohms from three inputs: your supply voltage, the LED's forward voltage, and the desired current through the LED. It also reports the power the resistor will dissipate so you can choose a part with an adequate wattage rating.
How to Use It
Enter the supply (or battery) voltage powering the circuit, the LED's forward voltage drop (typically 1.8–2.2 V for red, 3.0–3.4 V for blue/white — check the datasheet), and the target current in milliamps (20 mA is a common safe value for standard LEDs). The calculator returns the minimum resistor value. In practice, round up to the next standard E12/E24 resistor value to stay on the safe side.
The Formula Explained
By Ohm's law, the resistor must drop the difference between the supply and LED voltages: $$R = \frac{\text{Supply (V)} - \text{LED Forward (V)}}{\dfrac{\text{LED Current (mA)}}{1000}}$$ Because current is entered in milliamps, it is converted to amps (÷1000) before dividing. The power dissipated is \(P = (V_{supply} - V_{led}) \times I_{led}\).
Worked Example
Driving a red LED (\(V_{led} = 2\ \text{V}\)) at 20 mA from a 12 V supply: voltage across the resistor = \(12 - 2 = 10\ \text{V}\). Current = 0.02 A. $$R = \frac{10}{0.02} = 500\ \Omega$$ Power = \(10 \times 0.02 = 0.2\ \text{W}\) (200 mW), so use at least a ¼ W resistor.
FAQ
What if the supply equals the LED voltage? The voltage across the resistor is zero, so no resistor can limit the current — you need a higher supply voltage or a constant-current driver.
Why round the resistor up? A slightly higher resistance gives slightly less current, which is safer for the LED and barely affects brightness.
What current should I use? 20 mA suits most standard 5 mm LEDs; high-brightness and power LEDs may use more — always check the datasheet's maximum.