Compute the current-limiting resistor for an LED. Formula: R = (Vsupply − n · Vf) / If. Picks the nearest standard E12/E24 value and calculates power dissipation so you can size the resistor wattage.
R = (Vsupply − n · Vf) / If