I am planning on battery upgrades to as large as I can fit for house batteries on my 1984 F32 Hoyt. Has anyone previously upgraded theirs and can advise on whether Group 27 or 29 batteries will fit under the companionway?

I have a box of sorts in there that appears original with dividers for 3 batteries, but I believe as is it would only fit Group 24. I expect I can adjust the length of the box, but I don't currently have access to get into the boat and am unsure if the longer batteries will fit under the stairs, either due to height or length limitations.