It depends on 4 factors:
What kind of shape is the battery in?
What kind of charge does it have when it’s parked?
What kind of active drains are there on the battery?
What’s the environment?
Your more modern cars may have a number of small battery drains going on, even when the car is parked. You got the clock, sometimes an alarm, various computers may maintain their memory through a small power drain, the keyless entry, etc.
A short in a low power system might not get noticed for a long time, if at all, yet drain the battery quickly once the car’s parked.
The weather, and the shape the battery’s in are going to matter, as well as the immediate environment of your car’s engine and battery compartment.
Very damp or wet weather and a dirty compartment may create a mild drain. Cold weather seems to kill batteries. What it’s resting on may be important. I don’t know why, but when I took the battery out of my tractor for the first time and put it on the concrete floor, it lost all its juice fast. If you put it on a block of wood it seems to do ok. So, what the battery is resting on matters too.
If you want to play it safe, don’t let your batteries get more than three years old, and if the car’s gonna be sitting for a while, there’s a little connector you can buy with a little wing nut on it that disconnects the battery if it’s going to be sitting for a while. Keep the battery clean and park it in a place where it won’t be sitting in water, and out of the day/night cycle so that dew is minimized.