This is from my blog for our 2012 transit (prices are probably higher now - this is to show how the cost is calculated):
... a reservation to go through the canal... costs $25,000... In addition to the reservation fee, the ship/line pays $134 per occupied berth (bed), $108 per unoccupied berth. That’s for everyone, passengers, crew, officers, staff. For this ship, that’s more than a quarter million dollars if every berth is occupied: 1260 passengers + 580 crew= 1840 * 138 = 253,920 + 25,000 reservation fee = $278,920. This amount is divided among the passengers.