Height comes from the shoulder, not the head
Shoulder height is the measurement that matters because it tracks the leg length and the body mass that produce the jump. A dog measured at the top of the head gets a number that changes with how it is holding itself, which is no use. Stand the dog square, measure the floor to the top of the shoulder blades, and use that.
The multipliers here run from 2.2 times shoulder height for a dog that never leaves the ground at a barrier, up to 4 times for a genuinely athletic build, with a floor under each class so that a very small dog does not end up with an absurdly short fence. The result is rounded up to a six inch increment because that is how fence material is sold, and buying to a rounded height is easier than buying to 53 inches.
Under, not over
The barrier under the fence is where most of the actual escapes happen, and it takes two forms.
| Approach | What it is | Where it wins | Where it fails |
|---|---|---|---|
| Buried barrier | Mesh turned down into a trench along the fence line, commonly 12 to 24 inches deep | Invisible once backfilled, nothing to mow around | An enormous amount of digging, and roots and rock decide where the trench actually goes |
| Outward apron | Mesh laid flat on the ground outside the fence, pinned down and grassed over | Far less work, and the dog hits it under its own feet at the exact spot it digs | Visible for a season until grass grows through, and a mower has to know it is there |
| Concrete or paver mow strip | A hard strip along the fence line at grade | Permanent, doubles as a trimming edge | Cost, and it commits you to the fence line forever |
The apron is the one most people should choose. A digging dog works at the base of the fence, not a foot out from it, so mesh lying flat where it stands is met immediately and the digging stops being productive. The calculator sizes the apron area in square feet across your whole run, which is the number you take to a supplier.
The gate is the weak point and it always was
A fence is a continuous barrier interrupted by the one part with a moving joint, a hinge that sags, a gap that grows and a latch operated by people in a hurry. The hardware guidance here is short because it is the same everywhere: self-closing hinges so a gate left swinging shuts itself, a latch on the outside face above the height a dog can reach standing on its hind legs, and a second catch on any gate that matters.
The reach figure of roughly twice shoulder height is a working estimate for a dog standing against a fence face. The latch height it produces adds a margin on top of that and rounds up. Where the ground on the outside is higher, add the difference, because the dog is standing on it.
What quietly undoes all of it
A fence is only as tall as the thing standing next to it. Bins, planters, firewood, a stack of pallets, a compost bay, a snowdrift against the north side in February: each of them is a step, and each of them arrived for an unrelated reason with nobody thinking about the fence. Walk the perimeter from the inside once a season and look at it as a dog would, which mostly means looking at the bottom three feet and at anything you could climb onto.
Ground movement does the rest. A fence built level to grade develops gaps where soil settles, where water runs, and where a gate swings over a high spot that has since worn down. None of that shows up in a height calculation and all of it shows up in the yard.
For the fence as a construction job rather than a containment problem, the fence post calculator covers post count, spacing and concrete, and the livestock fence calculator handles longer agricultural runs. If the fenced area is being built specifically as a run rather than a whole yard, size it first with the dog run size calculator, and if the dog is going to be let through the house wall as well, the pet door size calculator uses the same shoulder measurement you just took.
Questions people ask
How tall does a fence need to be to keep a dog in?
It depends far more on the individual dog than on its size. This page works from shoulder height multiplied by a factor for jumping ability, which ranges from 2.2 for a dog that never leaves the ground to 4 for an athletic build, with a minimum height under each class. A 22 inch shoulder that hops low obstacles lands at 66 inches; the same dog with a genuinely athletic build lands at 90. If you do not know which class your dog is in, watch it at a low obstacle before you buy fence material, because guessing low here is expensive to correct.
Is a buried fence barrier better than an apron laid on the ground?
The apron is usually better and is always less work. A dog digging at a fence starts at the base of it, so mesh lying flat on the ground under its feet is encountered immediately, whereas a buried barrier is only met after a foot of successful digging has already happened. The apron also does not care about tree roots, rock or a run of buried services, all of which turn a trench into a much larger job than it looked. The buried version wins on appearance once it is in and on not having to mow around anything.
Will making the fence taller stop a dog that climbs?
Generally not, and it can make things worse by giving a longer ladder. Climbing is about footholds rather than height: chain link is a mesh ladder, horizontal rails on the inside face are rungs, and welded wire with large apertures is climbable by anything determined. What works is removing the grip, with solid panels or small-aperture mesh, keeping all the rails on the outside face, and adding an inward-angled extension at the top so there is nothing to hook a paw over. The 18 inch topper this page adds is for that, and it is angled rather than vertical for exactly that reason.
What gap under a fence is too big?
Smaller than most people assume, because a dog that can get its head and shoulders through can generally get the rest through. This page sets the limit at about 30 percent of shoulder height, capped at four inches, and applies it along the whole run rather than at the posts. That last part matters: fences get built level and the ground is not, so the gap you need to worry about is at the low point in the middle of a span and under a gate that swings over a rise. Check it with a tape rather than by eye.
Are there rules about how tall I can build a fence?
Almost certainly, and they are local to you. Height limits, different limits for front and rear boundaries, setback from the property line, what materials are allowed, whether a permit is required, and what a homeowners association will permit all vary between jurisdictions and sometimes between streets. Rules about keeping animals contained vary the same way. Nothing on this page is a statement about what is permitted where you live. Work out the height you need here, then find out what you are allowed to build before ordering anything.