Edinburgh is two cities side by side. The Old Town grew along the spine of rock that runs down from the castle to the palace of Holyrood, a medieval street of tall tenements and narrow closes where the whole city once lived on top of itself. In the 1760s, crowded and dirty, it built a second city across the valley: the Georgian New Town, a planned grid of crescents and squares, at the time of the Scottish Enlightenment, when Hume and Adam Smith walked these streets. Both are a UNESCO World Heritage Site.
It's a small capital, about half a million people, and a walkable one, though there's always a hill. It's also the city of festivals: in August the Fringe and the International Festival take over every room in town, and at New Year Hogmanay draws crowds from around the world. The rest of the year it's quieter, cozier and easier to enjoy. Five days give you the city, its two hills and a day at Stirling Castle.
This plan keeps each day in one part of town. Day one is the castle and the upper Old Town, day two Holyrood and Arthur's Seat, day three the New Town, day four Stirling, and day five the Botanic Garden and the port of Leith. It starts on a Sunday, because Holyroodhouse is closed on Tuesdays and Wednesdays outside summer, the Parliament closes on Sundays, and Leith's best restaurants close early in the week. For the bigger picture, see our page on the United Kingdom.