Ticket calculation