Gorilla pointed this out in part, but the best weapon is preparation.
For instance, my current situation is a perfect example:
Within my house, I have a
M1 Garand, a
Ruger Mini 14, and a
Walther P38. Added to this, I have several melee weapons with which I am, at the very least, proficient with. (There are also several other small arms, including a couple of .22s, though I've chosen to include only the weapons with which I am capable of stopping a human, and thus a zombie, in their tracks.)
All of the windows of my house are double-paned and easily accessible to board up. My front door is exceptionally solid. I installed the back door is also solid, and I installed it myself. My "garage" is a large concrete structure that has been converted completely into a machine shop. I have a gas generator and enough dry food to feed myself and my grandparents for about a year.
Approximately 300 degrees around my house has its visibility open for at least a 100 yards. The remaining 60 degrees is covered by a heavy wall of trees that serves to cover me moving from my back door to the door of my shop. I have a camp stove in my kitchen. Power is really not necessary to run my house.
On top of all of this, I live in a small town. I literally have enough ammo for the Garand alone to kill 3 times my town's population. Bring the zombie apocalypse on.
And, finally, immediately on the other side of the heavy tree line that guards my back door is my neighbors 500 gallon propane tank. In the event that I need to go out in a blaze of glory, I have my means.
Preparation.