How is profit calculated?