When should I leave for the airport?

Your flight time and the ride give the time to leave home.

Kind of flight
Luggage
Extra margin

A rule of thumb. Follow what your airline says, and allow more time at big airports, on holidays and when the roads are busy.