There are a lot of different seatpost sizes avaiable.
The critical measurements for any seatpost is the diameter and the length. Seatpost diameters are normally etched into the seatpost directly below the minimum insertion line. The length is normally expressed as 300mm ( 11.8 inches), 350mm (13.5 inches), 400mm (15.75 inches).
Seatpost Diameter Sizing
It is important that you get the exact size seatpost your bicycle was designed for. The diameter measurments normally range from 25.4 to 31.6mm. Some of the more commons sizes are 25.4, 26.8, 27.2, 30.9, 31.6. There are other sizes that are used also.
Put a little Grease on it
Before inserting your seatpost into your frame put a thin coat of grease on the post. This will keep your post from rusting to your frame and making it impossible to adjust your seat height. In humid parts of the US the post can rust into the frame in a year or less.
Using a smaller seatpost diameter
If you try to use a seatpost that is smaller than the bike was designed for you will not be able to get the seatpost clamp on the frame of the bike to tighten up enough.
Your seat will continuously slide down into the bike when you hit a little bump. This will drive you nuts. Also in overtightening the seatpost clamp on your bike you can damage the bike frame.
Check out Seat Posts on Ebay
Using a Larger Seatpost
This is really hard to do because you probably will not be able to get the seatpost to slide down into the frame at all.
Check for Cracks
Do not use a cracked or bent seatpost. Seatpost failure will usually happen at an already stressful time--you just hit a big bump or something--and can easily multiply any problem.
A Bent seatpost will bend much more easily where it was already bent.
Seatpost Minimum Insertion Line
This line is normally about two inches from the bottom of the post. This will usually give the post and the frame enough support. If you raise your seatpost above the minimum insertion line and then hit a fairly large bump while sitting on your seat you are quite likely to damage the seatpost or the frame or both.
Seatpost that are rusted into the frame.
I always lightly coat a seatpost with grease before insertion. This makes it a little tougher to get the seatpost to stay where you put it but it keeps the seatpost and frame from rusting together. Any area where there is fairly high humidity it is important to coat an aluminum or steel seatpost with grease before insertion. I have seen a lot of frames through the years that were ruined as someone attempted to remove a seatpost.
Check out Seatposts here
Carbon Fiber Frames and Seat Posts
When either the frame or seat post is Carbon Fiber there is a special grease type compound to use. This compound is made by a couple of different companies and helps keep the post from sliding.
Carbon fiber posts while being very light in my experience may not hold up as well as aluminum posts. Be careful about over tightening.