how to calculate a column