Leave+21 days ptdy+leave accrued during that span.
Ive seen it done in as little as 2 weeks prior....but 3-6 months is more usual.
Theres a bunch of shit to do to get out (taps, physicals, va paperwork, sbp, finance, Tmo, etc etc etc). And all the standard PCS outprocessing thrash as usual
Theres lots of “extra” stuff you can do thru airman and family readiness (boots to business, etc) that are effectively on-base ptdy if you want to work less on the work days prior to terminal leave.
You DO have to final out, in uniform, last thing before you start your last block of (terminal) leave.
And read up on the final pt test rules. Some places are sticklers for it.
Plan your timeline carefully .... a misstep can earn you a 179. Terminal leave is not guaranteed. Big blue only has to get you back 30 days prior to seperation date (i think .... read up) and is happy to let you sell the rest of your leave.