calculation of formula on calculator page