There is a simple and cheaper solution before you invest in the complete underground wire.
PetSafe offers a wireless electronic control unit. It is $299? $249? You can purchase online or at PetSmart. It comes with one electric collar.
It works the same way, but creates a circular dome. One unit can give your dog a good distance from the house. I lived in a rental house without fencing and used that for my two dogs. Once I left that house, I moved the unit to my camper and instead of tying my dogs at campgrounds next to the trailer, I have their collars on them and an electric zone.
The premise is no wires to bury. You set the unit up in the house and identify the overall area you want your dogs to have. There are 20 distance settings. And the shape is always round.
I also like these collars because they allow you to set the level of "NO" to the dog. From noise only to a pretty good kick in the pants.
Bad things about all electronic fencing.
As farmpony84 mentioned, a fast dog can get past the fence with barely a nip. But, a slow dog coming back home will get a gangbuster nip (nip being the technical term for the impulse).
Training on smart dogs is less than 4 weeks. Dull dogs or dogs with high pain threshold, more than 4. You have to put flags out, these are the visual queues for your dogs. And, during the training phase, you must always place the dog on a leash to train. During the training phase, every trip outside must include you with you dog on the leash. No shortcuts.
Some dogs are impervious to fencing. The costs to install inground wires can cost upward of $1k. If you are unsure if your dog will respond well to the fencing, the wireless solution is very affordable. Once your dog has trained to it, you can expand to the underground (which gives you a wider area AND you can create contour (square, oblong) perimeters. And then sell the wireless on eBay if you can't repurpose it.