Measure the distance from your floor to the underside of your bar's counter. Typically the bar will have a lip that hangs out a few inches from the base. Measure to the underside of this lip. Write the distance down.
Subtract 12 inches from the distance you wrote down. This will give you the optimal height for the seat portion of your bar stool. For example, if the distance between your bar and floor is 36 inches, you should purchase a bar stool with a seat no higher than 24 inches.
Measure your desired bar stool by placing the bar stool on the floor and finding the distance from the floor to the top of the seat portion of the stool. If it matches your optimal height, you have your bar stool.
Test your bar stools. Place the bar stools in front of your bar and have several people sit in them. Make sure everyone is seated comfortably. If the stools do not quite fit, add or subtract a couple of inches off of your desired height.