how to calculate cost per order