The seatpost diameter must match the inner diameter of the seat tube on the frame. Most standard diameter is 27.2mm. However, older steel frames often have 26.8. Frames normally had a standard outer diameter tubes, but depending on the thickness of the tube, the inner diameter could vary.
Most models of seatpost come in several diameters. In our database, we list the different diameters, separated by slash. In that way, a search for a suitable diameter will match the individual part of the string.
The seatpost diameter is usually stamped near the bottom of the seatpost. If not, you have to measure it. On my Rocky Mountain, the new alloy post I bought is stamped 26.8 mm, but I had to measure the old post. Sheldon Brown says 27.2 mm has become more of a standard. However when you measure a seat post with a caliper, you discover they can vary slightly, and are not really exactly round and uniform. I initially measured mine to be 26.8 mm, and in places is not completely round.
Rocky Mountain: 26.8
Yellow Brodie: 27.2
Shims: There are also shims that take you from 27.2 to 31.4, although I would be reluctant to try one, since adjusting seat height is a common operation and having one more piece in there just adds complexity.