Calculating revenue and variable costs