Cost and revenue calculation