The short answer: with less than 6 hours, stay in the terminal. With 8 you can get real sleep outside the airport. With 12 you have time for Casco Viejo, and with 24 or more, to see the Canal without rushing.
The long answer depends on three things: whether your documents let you enter the country, how long it takes you to get out of the terminal, and how far away the thing you want to see is. One at a time.
Can you leave the airport?
Leaving during a layover means formally entering Panama: you go through immigration and, if your bags are checked through to your final destination, they normally carry on without you. If they are not checked through, you will have to collect them and check them in again.
Entry requirements depend on your nationality and on the document you travel with, and they change from year to year. Before counting on going out, confirm it with your airline or the Panamanian consulate that covers you: it is the one piece of this guide we cannot give you ourselves.
How much time you really need
Set aside 3 to 4 hours of your layover for the airport alone: immigration on arrival, the trip back, and security before boarding. For international flights you want to be in the terminal 3 hours before departure.
That means an 8-hour layover leaves you around 4 useful hours outside, and a 12-hour one around 8. It is a conservative estimate, and that is exactly why it works: missing a connection costs far more than staying inside.
Getting out and back
The airport has its own metro station on the Line 2 branch. It is the most predictable way to move because it does not depend on traffic, which in Panama City can double any trip at rush hour. You pay with a rechargeable card sold at the station itself.
A taxi works too, and at dawn it is usually the only option. Agree the fare before getting in or book through an app: street taxis do not always use a meter.
With 6 to 8 hours: sleep, do not sightsee
With this margin, do not try to see the city. What changes a layover like this is not a rushed walk, it is making your next flight having slept in a bed, with a shower and no terminal noise.
This is where distance matters: the closer you sleep to the airport, the more hours of sleep you keep. From our building it is 4 minutes by metro to the terminal: a single stop, plus a 2-minute walk to the station.
With 12 hours: Casco Viejo
This is the plan with the best return. The old town takes a couple of hours on foot: squares, churches, the ruins, and viewpoints looking across the bay at the skyline. You can eat well at any hour.
Count on about an hour to get there from the airport and another to come back. With a 12-hour layover that leaves you 4 or 5 hours in Casco Viejo, plenty to see it without running.
With 24 or 48 hours: the Canal and more
With a full day, the Panama Canal is the obvious stop. The Miraflores locks have a visitor centre with viewing terraces; if you time it with a ship going through, watching it rise or drop between the gates is the memory you take home.
With two days you can add the Amador Causeway, with its view of the city and the bridge, the Biomuseo designed by Frank Gehry, or a trip to the nearby Caribbean. At this point it stops being a layover and becomes a short trip, and it is worth treating it as one.
Practical details that save time
Panama uses the US dollar — the balboa circulates only as coins and is worth one dollar — so there is no currency to change if you come from the United States. Sockets are the American type, at 110 volts.
The climate is warm and humid year-round, with heavy but short rain between May and November: a half-hour downpour will not ruin your plan if you carry something waterproof. And keep your phone charged: you will need it to get back.
Sleep 4 minutes from the terminal
A full apartment across from the ITSE metro station, with one or two bedrooms, one stop from the airport. Self check-in at any hour, so a dawn layover does not depend on someone waiting up for you.
See the apartmentsFAQ
How many layover hours do I need to leave the airport?
Eight hours is the reasonable minimum for leaving to be worth it, and only to sleep nearby. To go into the city you want twelve or more, because you have to subtract 3 to 4 hours of formalities and travel.
Can I get from the airport to the city by metro?
Yes. Tocumen Airport has its own station on the Line 2 branch, and from there it connects to the rest of the network. It is more predictable than a taxi because it does not depend on traffic.
What if my layover is in the middle of the night?
At night the metro does not run and your options come down to a taxi. If you are sleeping outside the airport, pick somewhere with self check-in: ours uses a keypad lock and we send you the code before you land.
Do I have time to see the Canal on a layover?
With 24 hours, yes and without stress. With 12 it is tight: you would have to choose between the Canal and Casco Viejo, and Casco Viejo is closer to the centre. With less than 12 hours, leave it for another trip.