> A tram can carry three, five or even more passengers with the same one driver

This is a negative! Service matters. If you have more than 50 passengers per hour off peak, or 200 peak you should be adding more service. A small 50 passenger bus can easially handle those numbers (they are per hour, people shouldn't be riding any bus for more than 10-15 minutes). Only when you are running a bus every 5 minutes should you start thinking about putting more people on vehicles you have, and thus only then is a tram worth thinking about. When a bus and tram is handling the same number of passengers the bus is cheaper to run (the bus shares the cost of the road with other users, while the road is more expensive than tracks you will have it anyway)

> and are way more energy efficient to boot.

This isn't significant enough to worry about. A bus is a lot more energy efficient than a car (assuming people use it), the additional gain from a tram for the same number of people is minimal.

> the bus shares the cost of the road with other users

A bus does much more damage to the road than a tramway though (to say nothing of trucks, these are even worse). Anything rail based, the load from weight and movement is transferred via the rails and subterranean sleepers to the foundation, whereas a decently used bus road will need to be resurfaced at least every five years, more in a hotter climate as the buses will inevitably seriously groove the asphalt. Tramways is more like every 20 if not 30 years until you need to do a full replacement.

On top of that, this "the cost is already paid" math is annoying to me on a personal ethical level because it excuses putting people into cars and freight onto trucks because "they already are there".

> A bus is a lot more energy efficient than a car (assuming people use it), the additional gain from a tram for the same number of people is minimal.

A single Class R 3.3 tramway vehicle (~36 tons) in Munich carries 218 people, more if you squish the passengers ("Sardinenbüchse" feeling). Munich's largest bus with a carriage unit, in contrast, carries 130 people [1] at ~20 tons. The gain from regenerative braking that you get on tramways actually matters at that scale, and as said, drivers are already short in supply.

Fully agree on your calculation regarding traffic by the way, however the problem in practice often is that a bus network is planned and installed based on very conservative estimates, induced demand hits and the buses are overcrowded, but no one wants to put up the money and upgrade to a tramway because "we just got buses, they aren't even paid off yet".

[1] https://www.merkur.de/lokales/muenchen/setzt-anhaenger-busse...

Cost is already paid is important. We need to get freight around. Roads because they are flexible are the best way to do that. When the roads are not congested (which if we are only talking freight they are not even in the densest cities) sharing with other users makes sense (in a dense city cars quickly turn into congestion, but we are only adding buses to the existing freight system so we can ignore that). Sure a bus does more damage than a car, but there are other freight users doing a lot of damage so you need to build for that use anyway. Thus we will have the roads anyway, the question is do we build something else as well and is that worth the costs - here buses are a lot cheaper.

What is the weight of that bus and tram when they only have 20 people on though? Similarly what is the cost of the driver or a bus vs tram when there are only 20 people you need to move on the vehicle? Because this is a problem you should be aiming to have: getting transit to those less dense areas that will never have 200 people on board with 5 minute frequencies. You should prioritize high frequency service over larger vehicles until you are running something every 5 minutes because that high frequency is the best way to kill complaints that transit is not convenient. It is of course expensive, if you are getting enough riders to need a bigger vehicle you should have the money from those riders to give them better service.

There are places in the world where you need the capacity of a tram. However I submit that most places should be building a fully automatic metro system anyplace they are thinking about a tram. Only after you have that comprehensive system can we ask if there really is enough demand to also run a tram for shorter trips. The down side of a metro is the grade separation means very short trips are not feasible because of the need to get to the tracks - but most areas can live without that additional service and they need the additional speed a metro can give.

> however the problem in practice often is that a bus network is planned and installed based on very conservative estimates, induced demand hits and the buses are overcrowded, but no one wants to put up the money and upgrade to a tramway because "we just got buses, they aren't even paid off yet".

Nothing you can do about bad planning. Though really if the buses are that full and not paid for you should have already had them anyway, and there are plenty of other places you that don't have service yet (because if you did you would see this coming and the buses would be paid for) that you can move the buses. The only issue is the cost of building the tram - buying a lot of buses is cheaper than building a new tram line. (I'm assuming you are not talking about Bus Rapid Transit - that has a place but it is rarely a good answer)