LED Resistor & Voltage Divider Calculator
Series resistor with standard values, and a divider that solves for any missing value.How the LED resistor is calculated
An LED needs a series resistor to limit its current: R = (Vsupply − n·Vf) / If, where Vf is the LED forward voltage and If the desired current. Since resistors only come in standard values, the calculator rounds up to the nearest E12/E24 value — the safe direction, because it keeps the actual current slightly below your target. It also shows the power dissipated in the resistor and a recommended power rating with a 2× safety margin.
The voltage divider tab solves Vout = Vin·R2/(R1+R2) for whichever field you leave empty, suggests the nearest standard E24 resistor, and shows the divider current and per-resistor power. Keep in mind a divider is only good for light loads — anything drawing comparable current to the divider itself will pull Vout down. Related: Resistor Color Code Calculator.