Most dog beds that get returned were not defective; they were the wrong size. Buying by breed name or by eye is the root of it, because two dogs of the same weight can need different beds and a bed that looks generous in a product photo can leave a tall dog hanging off the edge. Getting the size right is a short process: measure the dog, add the right margin, and account for how the animal actually sleeps. Do that and the bed fits the first time, whether you are buying one for a pet or speccing a custom run for a business.
Measure the dog, then add margin
Start with a tape measure, not a size label. Measure your dog from the tip of the nose to the base of the tail while it is standing and calm, and measure the width across the widest point, usually shoulder to shoulder. Those two numbers are the dog; the bed has to be bigger. A common rule adds roughly 6 to 8 inches to the length for a small dog and scales up to 12 or more inches for a giant breed, with a similar 4-to-6-inch cushion on the width for dogs that shift and roll. When you are between sizes, round up. Extra room lets a dog stretch and change position through the night, while a bed cut too close forces it to curl whether it wants to or not.
The margin is not a fixed number, it is a range that grows with the dog. A Dachshund and a Corgi can weigh the same yet measure very differently in length, which is exactly why a tape beats a breed chart. The graphic below shows how the recommended interior length climbs as you add margin to the measured dog, and why a dog that sprawls needs the upper line rather than the lower one.

Read how your dog sleeps
Sleeping style changes both the size and the shape you should buy. A curler, the dog that tucks into a tight ball, feels secure in a round or bolstered cuddle bed and can take a slightly smaller footprint because it never fully extends. A sprawler, the dog that stretches out flat or lies on its side with legs extended, needs a rectangular bed and an extra 6 to 8 inches beyond the standard recommendation so nothing dangles over the edge. A leaner, the dog that rests its head and back against something, does best with a raised bolster edge for support.
Size to the most extended position you ever see, not the average one. Dogs that curl on a cold night will still flop out flat on a warm one, and a bed that only fits the tucked pose becomes uncomfortable the moment the dog stretches. If you are unsure of the style, watch where the dog sleeps now: a dog that seeks out the cool floor to stretch is telling you its current bed is too small.
Where the standard size classes land
Manufacturers group beds into a familiar ladder, and it is a useful starting reference even though the exact dimensions vary between makers. A small bed runs around 24 by 18 inches for dogs up to about 20 pounds, the toy and small breeds like Chihuahuas, Pomeranians, and Dachshunds. A medium near 36 by 28 inches suits 20-to-50-pound dogs such as Beagles, Corgis, and Bulldogs. A large around 46 by 36 inches covers the 50-to-90-pound range, the Labradors, Golden Retrievers, and Boxers. An extra-large or giant bed near 54 by 44 inches is built for dogs over 90 pounds, the Great Danes, Mastiffs, and Newfoundlands.
Treat weight as a proxy, not the final word. The classes are handy for a first pass, but a long-bodied or leggy dog can sit at the top of its weight band and still need the next size up. Confirm against your measurements before you commit, especially on a custom bed where the whole point is a fit that a stock size cannot give. The chart below lays out the typical dimensions per class.

When to size up beyond the chart
Several situations argue for going larger than the basic rule. Orthopedic and senior dogs need to lie fully flat on a supportive surface without any part of the body dropping off the edge, so the usable interior has to comfortably clear the dog’s extended length; the fill you choose for those dogs is its own decision worth reading up on separately. A growing puppy should be sized for its projected adult dimensions rather than its current ones, or bought to replace as it grows. Two dogs that share a bed need a footprint that fits them side by side in their sprawled positions, not squeezed together. And a dog that likes to rest its head up benefits from a bolster, with the caveat that a bolster eats into the flat sleeping area.
Getting the fit right on a custom bed
Custom beds solve the fit problem that stock sizes create, but only if the order is specified carefully. Give the maker your measured length and width plus the margin, and be explicit about whether the dimensions you are quoting are the interior sleeping area or the exterior of the bed, because a thick wall or a raised bolster can shrink the usable space by several inches without changing the outside footprint. Decide the cover and washability at the same time, since a removable, launderable cover has to be cut to the same finished size to fit without bunching. Measure the dog in its most stretched-out pose, add the margin that matches its size and sleep style, confirm interior versus exterior dimensions, and a custom dog bed becomes a product that fits the animal it was made for rather than a size that was close enough.