LED Resistor Calculator
Enter any 3 of supply voltage, LED forward voltage, forward current or resistance — the calculator solves for the 4th.
Enter exactly 3 of the 4 values to solve for the 4th.
Formula, typical values & edge cases
Rearranged for each variable:
IF = (Vsupply − Vf) / R
Vf = Vsupply − IF × R
Vsupply = Vf + IF × R
Power dissipated in the resistor: P = (Vsupply − Vf) × IF
1Worked example: 9V supply, red LED (Vf ≈ 2V), 20mA target current → R = (9−2) / 0.02 = 350Ω, dissipating 0.14W.
Edge cases: Vsupply must exceed Vf or no current flows (flagged explicitly). A 0Ω resistor when solving for current is a direct short, not a valid current-limiting circuit (flagged explicitly). Negative inputs are rejected — none of these quantities are meaningfully negative in this context.
Common questions
Why does an LED need a resistor at all?
LEDs don't obey Ohm's Law — past their forward voltage, resistance drops sharply and current would climb uncontrolled, destroying the LED almost instantly if connected directly to a supply. The resistor limits current to a safe level.
What forward current should I target?
20mA is a common safe default for standard 5mm LEDs, but always check the specific LED's datasheet — high-brightness and surface-mount LEDs often have different maximum ratings.
What happens if I use a bigger resistor than calculated?
A larger resistor reduces current below the target, making the LED dimmer but safer. A smaller resistor increases current above the target, risking overheating or destroying the LED — when in doubt, round up, not down.