You rounded probably prematurely.So
ROUND(SUM(price - (price* TAX/100) + purchaseprice),2)
should give the wanted result.