This plugin allows you to make server-side JavaScript calculations for a list of things and store the individual results directly in the database.
If you want to change only one database entry, you can use the included simplified version "#7S Smart Calculator".