Calculating fraction of a whole