The "hours" you have to cancel depend on the 24-hour rule and your specific fare type. Under the U.S. Department of Transportation rules (and similar policies globally), most airlines allow you to cancel for a full refund within 24 hours of booking, provided the flight is scheduled at least seven days in the future. Beyond this initial window, the timing depends on your ticket: "Flexible" or "Refundable" tickets can often be canceled up to 2 to 3 hours before departure for a refund (minus potential service fees). For "Non-refundable" tickets, you can usually cancel until the check-in window closes to receive a travel credit, but if you wait until after the flight departs, you become a "no-show" and typically lose the entire value of the ticket. Always check your specific airline’s policy, as some budget carriers have much stricter cut-off times.