How to use resistor wattage formula
Only the voltage across the resistor is important, as that's the only voltage it "sees."

Both the current through the resistor multiplied by the voltage it drops (\$P=IE\$) or voltage squared over resistance (\$P=\frac{E^2}{R}\$) will get you the nominal power dissipation. If you don't know the voltage drop, but know the current through the resistor, \$P=I^2R\$ also works. Choose a resistor that has some margin of error more power-handling capability, perhaps 10-20%.