But if you swivel it to one side you can save a few inches. I'd measure mine, but it's off right now in favor of my chipper. I can say that it fits in a 16' shed with a foot or so to spare.
When I built my new garage addition for my BX24, I made it much longer then 16 ft. Reason is that sometimes I take FEL off in garage and it takes couple feet of space. Same with BH. when the FEL and BH is attached - the leakdown of boom makes the joint stick out roughly 3 ft or so and that would've hurt my newly installed doors if I didnt have enough length in garage. So If I were you IMHO go a minimum of 25 long so you have room in front and back to walk around with attachments off.
There is no such thing as a big enough garage.... I had a 18x38' barn/garage built for the toys and it's still not enough. The Bass boat is the biggest space offender. I recomend having big doors on both ends. It has simplified my life a lot.
When I built my first garage, (30' x 36') told my dad it wasn't big enough. His reply: When you finally get around to build one big enough you won't need it anymore.