When thinking of "the best" home defense gun, you have to get one thought out of your head. That is that there even is "the best" home defense gun. I see countless videos and articles on this subject, and frankly it can become nauseating. When something is your opinion, then it is that, but there is no "best" home defense gun. Now that we got that aside, lets get to my thoughts on this subject. My thoughts are formed from my experiences, training and discussions with highly skilled individuals (SEAL, Scout Sniper, Force Recon Marines, Special Forces, etc). Now throughout my training, I have heard arguments mostly both ways on almost everything, from how to maneuver a gun through hallways, to entering rooms, one man CQB and I have to say it has been great getting everyone I know and talk too's perspective on this subject.
As far as gun goes, we must start with which one. Pistol, Rifle, Shotgun and lets even throw in the exotics in there like machine guns (which require a great deal of money and patience to go through the legal requirements to own one). Mainly this is personal preference. Having a pistol affords mobility, while a rifle and shotgun provide power, a shotgun provides a greater spread and increased shot placement due to it, and on and on. So as I was saying, pistols equate to mobility. They are small, handheld, and depending on the caliber can be decent in the power department. Over penetration can be an issue with handguns, with .45ACP, 9mm, .40 leading the charge there. With over penetration I mean through objects, like walls, ceiling, windows, etc. Missing the target, which in a urban environment and placing you in a high stress situation, hitting the target with one shot and only pulling the trigger once is not normally the case, especially when it is someone who only goes and plink's or target shoots, compared to getting into more dynamic moving and shooting and scenario based training at say a class like Thunder Ranch or Trident Fitness (Trident Tactical), like the self defense class I went to lead by Rich Graham. Using a pistol to defend yourself is a great option.
Now to the title of the article, "the best". I really think the pistol that fits you, as far as power and ability to control is the best. If a 9mm is what you shoot the best, then use it and find the best ammo that runs reliably through that gun (remember to always run at least a magazine of your defense ammo through your gun to verify it will go bang instead of hearing a click when your life depends on it, around twice a year). Personally, I love Glock 19's, as do many people. It fits my hand perfectly, has a good amount of ammunition (15+1 standard or 17+1 if using Glock 17 magazines), is reliable and it is known for its durability. But, in the past I have used such guns as 1911's, Taurus PT92. M&P's and they have all been good. But, it is just the Glock 19 for me is like a blankie, it works, I train with it and it is apart of me. Ironically, when I did have a situation when someone was trying to get into our house it was not a Glock 19 I had, it was my 1911. I did not think twice, grabbed my 1911 and investigated based off of what the situation dictated. After the situation, and looking back having not my main pistol or home defense pistol that night does not make me feel uneasy. I have the mindset that you the person are the "weapon" so to speak, so all the training, and range time you have should give you the base to use almost any weapon, so that night it was my 1911.
Rifles are something home defense wise I do not venture into much, I do not live on a ranch with 400 acres of land, and in my situation it is something I find my handgun or shotgun are better. Now all the anti-gun people will say, see he said he does not need it for self defense! Well, listen just cause I do not need it for one thing, surely does not mean I don't need it for something else, ;) Rifles shoot at an amazing velocity for the most part, so remembering the walls, doors, ceilings, etc. and what the rifle is capable is what I would tell people hell bent on using a rifle for home defense, if in tight spaces like a town home. I feel they are more setup for single homes, not rentals, etc. So a ranch, or a single home with a few acres is where I would see them being used. I own AK-74's, and enjoy them. But there is something about a Krinkov or even sub 16" AR-15 with their shorter barrels that would turn me onto the idea of using one in a home defense situation.
Lastly let's discuss shotguns. Shotguns get a bad rap, I am not sure why but they do. Many people, maybe out of fear or not understanding them will say they are not for home defense. Now, I agree that not everyone should be grabbing a 12GA and saying "this is my home defense gun!". You need to train with it, know it's capabilities, what it does to walls, doors, etc in your house. Always remembering where family members, neighbors, etc are is something you must be conscious of, as every bullet or pellet that leaves your gun you are responsible for, so limiting the chances of something negative happening should be something you go through in your house and practice before bad events happen. With shotguns, you have to remember they are usually the same length as rifles, and depending you could have a pistol grip on yours. So maneuvering them and remembering around corners and through doorways will mean using some skill and attention to detail. I personally have a Remington Model 11 from 1927, that I love. Old, yes it is, but it is a kick ass semi-automatic five shot 12GA. I have never had any issues with it, service it as needed and I am attached to it. Has a 18" barrel, and the original stock, so it is not super long, which is why I like it for home situations. But I also have a Winchester 1300 Defender 12GA pump shotgun, which holds eight shells. I have no problem with either, just remembering that maneuvering in a tight spot, like houses are, I have to use skills learned from classes and knowledge I have obtained over the years to be as efficient as you can with a shotgun in tight spaces.
One thing as far as "home defense" goes that should never be under looked, is dry fire practice. Go through your house at night, using whatever gun and flashlight combo you have and get used to it. Remember to check the hinges! Small details like that, will up the chances you are successful at defending your home. Take some classes on the subject for more information, as the best way to get knowledge is not by reading and article or watching a DVD, but by going to a dynamic class that has doors, and shoot houses and doing the training with your firearms, and testing our which one you feel best with. You are the one that can answer the question "what is the best home defense gun", not me. Best of luck in your journey to find the best gun for you, and as always remember to have fun, be safe and learn as much as you can if you go to a course, you are paying for it so get your moneys worth.