Grand pianos are measured with the lid closed from the very front of the piano (keyboard end) to the very back (the tail). Lengths start at 4' 6" and go to over 10' (even longer in some experimental models). Widths are usually around 5' and heights around 3', but only the length has a bearing on musical quality.
Grands less than 5' long are the musical equivalent of spinets and consoles; that is, they are musically compromised and are mainly sold as pieces of furniture. Grands between about 5' and 5½' are very popular. Although slightly compromised, they can reasonably serve both musical and furniture functions and are available in many furniture styles. (By the way, piano professionals prefer the term small grand to baby grand. Although there is no exact definition, a small grand is generally one less than about 5½' long.) Above 5½', pianos rapidly improve, becoming professional quality at about 6'. Pianos intended for the home or serious professional top out at about 7' or 7½'. These sizes may also satisfy the needs of smaller concert venues. Larger venues require concert grands, usually about 9' long.
When considering what size of piano is right for your home, don't forget to add two to three feet to the length of a grand or the depth of a vertical for the piano bench and pianist. Shoppers tend to underestimate what will fit and buy smaller pianos than necessary. Sometimes, the next-size-larger instrument can give you a great deal of tonal improvement at little additional cost. Dealers can usually lend you templates corresponding to different piano sizes to lay down on your floor so you can measure what will fit.