Ohm's Law for LED:
$$ R = \frac{V_s - (n \times V_f)}{I_f} $$
Where $V_s$ is supply voltage, $V_f$ is forward voltage, $n$ is number of LEDs in series, and $I_f$ is desired current.
Power Dissipated by Resistor:
$$ P_R = I_f^2 \times R \quad \text{or} \quad P_R = (V_s - n \times V_f) \times I_f $$
The example rating applies a 2× arithmetic margin. Actual power rating must account for the resistor’s derating curve and operating conditions.
Constant forward-voltage DC estimate: R = (Vs − nVf)/I, P = I²R. The E12 choice is rounded upward. The displayed rating uses a 2× arithmetic margin; verify the actual resistor derating curve, LED current limits and forward-voltage spread. It is not a thermal qualification.