For home defense you will be much better off prioritizing deterrence.
Focus on good exterior lighting, solid doors and windows including the locks, exterior cameras, a security system, backup power, and a German Shepherd.
Forget about the firearm until the above is in place.
This is wisdom right here. I say this as a very avid shooter and gun enthusiast-- you don't want to want a gun or need one for your house.
Especially at home, there are so many way to improve your home security without taking on the potentially massive liability of gun ownership. Reinforce the doors and windows. Buy better locks. Install PTZ IR cameras and IR lights around the perimeter. Get a dog or get a bigger dog. I hear Cane Corsos are generally sufficient.
Those things require no gun skill on your part, no training, and have zero risk of wall penetration, accidental or negligent discharge or any of that. (well, a Cane Corso on a full run might penetrate a wall, I can't say for sure).
So let's say you've done all that and NOW you are ready to finalize your HD plan with a firearm. Which firearm? We select based on some constraints that are unique to this situation:
1) You're not at a range and misses are not innocuous. You MUST NOT MISS. There's only one acceptable thing to hit with a bullet and everything else is liability or heartbreak or both. YOU MUST NOT MISS. So, the #1 criterion in a home defense firearm is that you must be able to put your bullets on target all the time.
- The imperative to not miss means you need a 1) shoulder-fired weapon, that 2) is easily controlled (low recoil), 3) maneuverable indoors, but 4) has enough energy to incapacitate an intruder or multiple intruders. It must be semi automatic and offer speed of fire as fast as you can aim and pull the trigger.
While I love ARs, I think in the particular home defense role, there's an even better option: a compact rifle in 9mm. Think Ruger PC9 with a red dot sight.
- Shoulder mountable for max controllability
- Light weight and easy to control
- Semi auto with super fast follow up shots
- Takes Glock magazines
- Ballistics that are effectively a .357 Magnum-- CERTAINLY sufficient for stopping a human. (9mm in a rifle is much more powerful than 9mm from a pistol).
- Super affordable ammo that is the most produced firearm cartridge on earth
- Very low recoil
- Very low muzzle blast-- that's important when you might have to shoot indoors without ear protection. Sure you saved your life, but was permanent deafness a necessary tradeoff?
- Weighs 7# and only 33" long.
- Disassembles for easy transport (they are all "takedown" rifles) or storage. With practice, you could assemble one (it's just two pieces) and insert a magazine in seconds. They are the perfect "backpack" gun.
The PC9 is not only a PCC and the perfect home defense tool, but you can get it with a side-folding stock. You can literally keep it in a scabbard by your bed if you want and have a LOT more effective firepower than any 9mm pistol.
Why not an AR15?
-- more recoil, more blast, more stigma to do the same job.
Why not a shotgun?
-- Way too much recoil, pellets spread out and you either have too little penetration to stop a bad guy or so much that it punches through walls. Remember that part about not missing. Also, shotgun shells are expensive, most people will not practice much at all. Shot guns are ideal for hunting, NOT for home defense. Also a reliable semi auto shotgun is expensive. And you need a semi auto.
Why not a handgun?
-- much too hard for a novice to master. Handguns are very unstable and it takes skill and practice to shoot one well enough to ensure only bad guys are getting shot. Most people will not develop sufficient skill. I can't tell you how many times I've seen people at a range that can't even put an entire magazine on a paper plate at 7(!) yards, never mind 25 yards. A handgun is the ideal *personal* defense firearm, but it's not the ideal HOME defense firearm.
I can give a PC9 with a red dot to someone who has never shot a firearm before and I can, in 30 seconds, have them putting 20 consecutive shots on an IPSC silhouette at 25y. Only an AR15 can come close to such a feat of letting a novice render effective, life-saving firepower with little to no training.