Calculate Resistance
R = (Vsupply - N × Vf) ÷ I
For one 2 V LED at 20 mA from 12 V: R = (12 - 2) / 0.020 = 500 Ω.
Choose a Standard Value
Select the next higher standard value when the exact result is unavailable. Choosing 510 Ω instead of 500 Ω slightly reduces current and is generally preferable to exceeding the target.
Check Resistor Power
P = Vresistor × I = I²R
The example resistor dissipates 10 V × 0.020 A = 0.2 W. A 0.25 W resistor has little margin, while a 0.5 W part runs cooler.
Forward Voltage Is Not Fixed
Vf changes with current, temperature, LED color, and manufacturing variation. Use datasheet curves and evaluate current at minimum and maximum supply voltage.
Separate parallel LED strings generally need separate current limiting. High-power LEDs should use an appropriate constant-current driver.