Calculate from supply voltage, LED forward voltage and target current.
R = (supply voltage − LED forward voltage) / current. This is a theoretical estimate; choose components using their datasheets and allow a power-rating margin.