Base calculator functionality