up calc formula