Hunting down the cheapest airfare isn’t an exact science, but you don’t want to be either too early or too late. Unsurprisingly, there are plenty of theories out there as to the best time to book, whether it’s certain days of the week or a specific amount of time before your travel dates. A new study examining the prices of 197 million different airfares offered in 2017 finds that the answer varies by season, as Lifehacker reports.

The study, conducted by CheapAir.com, does away with the notion that certain days of the week offer cheaper bookings; according to this data, the difference between booking a flight on Sunday versus Wednesday probably only works out to a difference of a few dollars, so it’s not worth your time to wait. Now, there are cheaper days to fly on, so if you’re really intent on saving money, Tuesday and Wednesday are the cheapest travel dates, and Sunday is the most expensive.

How many days in advance you should buy your ticket varies more, especially between seasons. In general, CheapAir.com says anywhere between three weeks and four months in advance of your travel dates is the “prime booking window” to get a good price, but obviously that’s a huge stretch of time. If you drill down to seasonal flights, you can get a better picture, though. The best time to book a flight for the winter is 62 days in advance, according to this data, while spring flights should be booked 90 days in advance, summer 47 days in advance, and fall 69 days in advance.

Granted, all those numbers are based on averages, but they provide useful estimates, and the bonus for getting the timing right is valuable: The difference between the best-priced and worst-priced summer flights in the study was $203, and the difference in the spring was $263.

CheapAir.com offers a search tool that recommends when to buy the lowest-priced fares based on your particular route, so you can input your departure and arrival airports for a more customized “prime booking” time window. Other apps, like Hopper, will give you recommendations based on your travel dates and locations, will notify you the minute the price drops, and will estimate whether or not the price is likely to continue dropping further.

But if you can’t resist buying as early as possible, try signing up for a service like DoNotPay, which keeps an eye on prices for your flight and tries to get you a refund if the price drops after you reserve your ticket.

[h/t Lifehacker]