Calculating cost of an item