Resistance calculation
For one LED in series with one resistor, the calculation is R = (supply voltage - LED forward voltage) / LED current. Current must be expressed in amperes for the result to be in ohms. The calculation is meaningful only when the supply voltage is greater than the forward voltage and the requested current is positive.