Comparison and cost calculation