power loss calculation