24" is fine.
Unless you are trained in house clearing and have a buddy or three backing you up, I believe your chances of surviving an actual encounter with armed assailants in your home is best if you hunker down and let them come to you. Personally, I will have a king size bed between me and the bedroom door I'll be covering with a 12 gauge. The wife will be on the floor beside me talking to the 911 operator using her cell phone.
Proud member of the NRA and Texas State Rifle Association. Registered and active voter.