To leave the Istanbul airport and explore for part of the day: 8-12 hours. It takes at least 45 minutes without traffic to get to and from the airport and city center. If you have a shorter layover (around 8 hours), that will leave you enough time to explore the central Beyoglu District.