A beautiful fence adds value to your property, protection for your children and privacy for yourself. When you have horses, a fence is a priority to keep them contained and give them room to run. Putting up a fence is an easy do-it-yourself project but if you do not plant the posts properly it will soon be sagging and unattractive, and all your hard work will be wasted. The key to a sturdy, long-lasting fence is how deep the posts are planted and how they are packed. How deep your fence posts should be, and the method you use to pack them will depend a lot on two important factors: the kind of soil you have and the climate you live in.
Check your soil type. Heavy clay soil will hold the post firmer than a sandy, loamy soil. If you have a loose soil type like sand, you need to plant your posts at least 4 feet deep. Most clay soil can hold well at only 3 feet deep.
Find out where your frost line is. Warm climates have either a shallow frost line or none at all, so you can use your soil type to judge the depth of the fence post. However, a cold climate where winters are severe will normally have a 4-foot frost line. Make sure your post holes are dug out to at least the depth of the frost line so the bottom of the post sits at that depth to keep them from heaving in a freeze and thaw.
Space posts properly. You should never have more than an 8-foot gap between fence posts. Fence panels put too much pressure on posts spaced farther apart, and the fence will sag.
Decide whether to plant your posts in cement or soil. Once you dig your hole and put the post in you can simply backfill around the sides of the post with the dirt you pulled from the ground and pack it in firmly. That is fine for heavy soil and light fencing materials. If your soil is sandy and light and/or if the fence is large or heavy (as is a fence with wood panels), dirt packing will be too much of a strain on the fence posts. You should pour quick-setting cement into the holes around the pole to firmly seat them in order to hold heavier weights.
Never plant a fence post less than 3 feet deep, no matter what type of soil you have or what your weather conditions are. That is the bare minimum to keep a fence looking its best for a long time.