power loss calculation
It's a fundamental principle in electrical engineering, if you have a 2-lead device like a resistor, the power used by the device is equal to voltage across the device times current through the device.

\$P = IV\$

If the current flows through the device from the higher-voltage side to the lower voltage side, the device is consuming power (or dissipating it as heat). If the current flows through the device from the lower-voltage side to the higher voltage side (for example, if the device is a battery or power supply) then we consider the current to have a negative sign (for example, -10 mA) and the device is delivering power to the rest of the circuit.

Wikipedia has a page on electric power, but it quickly gets into more complex cases (like AC circuits) because for DC it really just boils down to this one equation.