The number of surveys done to determine what people perceive to be the most effective home defense firearm/ammunition combination is staggering. Just a quick look at YouTube will get hundreds of hits on the topic. Yet many miss the most important factor -- noise.
If you've never shot a handgun, rifle, or shotgun in an enclosed space before, (i.e. the square footage of your house hallway or bedroom), then you'd be in for a very unpleasant surprise -- not to mention hearing impaired for the following few days/weeks. Depending on the firearm, the over-pressure from a blast in such a confined space will bust your eardrums in a split second. Worst offender is a short barreled .223/5.56 AR pistol - it can literally burst your eardrums and knock you out when fired in a confined space -- even cause permanent hearing loss.
I write this because I witnessed another heated argument about firearm/caliber choices for home protection this weekend at the range-- the commonly accepted trope concerning "stopping power" is mute if you can only get one round off and afterward your head/ears are seething in pain (or worse you're incapacitated).
Point is -- choose wisely and recognize that shooting inside a confined space changes the firearm/caliber dynamic very radically.