There are many factors to consider when purchasing a mountain bike, and getting the right size is the most important. Mountain bikes come in a variety of sizes, and measuring them is relatively easy. You must first learn the bike parts, where to measure and how to translate this measurement.
Mountain bikes are generally measured by the distance of the seat tube, which is the vertical part of the triangle the frame forms. The tube runs from the bottom of the seat post where it meets the top tube to the middle of the crank. The seat post is the short stem that holds the bike seat. The top tube is the horizontal bar that runs along the top of the bike, and the crank is the larger circular piece in the middle of the bike where the pedals are attached.
Once you are familiar with the bike parts, use a tape measure to determine the distance of the seat tube. Record this distance in inches. This will give you a general frame size. Compare this measurement with the one listed for the mountain bike you are previewing. Different manufacturers can have different sizing systems, but generally they are rounded up to the nearest inch and sold in 2-inch increments.
Know the top tube measurement. This is the distance from the bike post to the handlebars and determines your reach. Proper fit is important for breathing, back and neck comfort, and ease of reaching the gears and brakes. Different manufacturers have different standards on the top tube. For instance, according to Colorado Cyclist, "One manufacturer's 17-inch frame may give you a 22-inch top tube, while the next one's 17-inch gives you a 22.8-inch."
Know how mountain bike sizes are labeled and sold. The most common mountain bike frames come in 15-inch, 17-inch and 19-inch sizes, and generally they are listed as small, medium, large or extra large. The best way to test a frame size is to go to a mountain bike shop and straddle a bike. You should have at least 2 inches of clearance from your crotch to the top tube, and you should easily be able to reach the ground with both feet and reach the handlebars with ease.