LED Resistor Calculator
The series resistor your LED needs, with the nearest standard value and wattage.
The formula
R = (Vsupply - Vforward) / I
The resistor takes up whatever voltage the LED doesn't. A red LED (2.0 V) on 5 V at 20 mA needs (5 - 2) / 0.02 = 150 Ω, which happens to be a standard value. Rounding UP to the next standard value is the safe direction: slightly less current, slightly dimmer, no harm.
Why the resistor at all
An LED's current rises almost vertically with voltage; connect one straight to a supply and it takes destructive current instantly. The resistor turns that cliff into a controlled slope. One resistor per LED, too: LEDs in parallel on a shared resistor hog current unevenly and die in sequence.