When flying to the USA from Canada, be aware that you clear US immigration and customs IN Canada, and NOT the United States. It's bizarre, I know. This can pose very long queues as there are no separate lines for US citizens vs foreigners. At the Calgary airport, you need to allow at least 2 hours to get through immigrations, security, etc. if you are taking a morning flight. This is especially true on Friday mornings as lots of people are leaving for the weekend. US customs opens at 4:30 AM. I arrived at 4:35 for my 6:30 AM flight and there already was a long queue that took me a half hour to get through. While I was in line, the queue grew quickly. It was at least an hour long.
In the afternoons, it's not usually an issue but morning flights can be hellish.