X-bar -- written as the letter "x" with a straight line or bar above it -- is statistical shorthand for the average, or arithmetic mean -- or average -- of x. Calculating it is the same as calculating the mean of x, where x can be any continuous variable, such as age, height or weight. The x-bar is used to represent the sample mean; that is, the mean of a sample rather than an entire population. The mean of the entire population is usually represented by the Greek letter mu.
Add up all the values of x. For example, if you have a sample of weights of adults and you get 150, 160, 170, 180 and 190, add these to get 850.
Count the number of values of x. In the example, there are five weights.
Divide the sum by the number of values. In the example, 850/5 = 170.