In all the applications I have made where a database is used I typically store the calculated value along with the variables needed to calculate that value. For example, if
Simple math is relatively cheap, however you need to weigh up the additional storage cost vs performance saving when storing these values. Another thing you may want to consider is the affect this will have on data updates, where you cant simply just update the field value, you need to update the calculated value too.