Most contractors will tell you that a good rule of thumb is to sink a post 1/3 of its total length into the ground. However, a contractor will also note that any post sunk into the ground needs to surpass the average frost line for the area it is in. Opinions on how far past the frost line a post has to be set vary among contractors depending on the type of post.
Find your location on an average frost line map. Follow the map guidelines for determining the average depth of the frost line is in your area. For most maps this is usually as simple as finding the line above your location and tracing it out to the side of the map.
Decide how your post will be set. If you want to include drainage under your post, you will need to add 6 inches to the hole depth for gravel.
Estimate whether the pressure that the post will need to withstand is high or low. Will it be supporting a gate? Will it be supporting a 6-foot-tall privacy fence in high winds? Will it be a middle support on a split rail fence?
Use the pressure estimate to decide how far below the frost line you need to dig. A middle support on a split rail fence is not under a lot of pressure, so 6 inches past the frost line should be plenty. A privacy fence in high winds will need at least 12 inches past the frost line. So, if you're in southern Texas, where the frost depth is zero, divide 64 inches by three for a minimum depth of 21 inches, plus 6 inches (27 inches) for a standard post, and add 12 inches (33 inches) for a post under higher strain. If you're in a state where the average frost line depth is 30 inches, then your post depth will vary from 36 inches to 42 inches -- so you may need a longer post to get the proper fence height.
Light duty posts don't require concrete, but gates, corners and high pressure posts do.
Always check with local authorities before starting a construction project.