A simple template engine can not fit for every requirement. If you want to output calculations you need to extend template output. There are multiple ways to do this.
1) Use a php content-plugin
. Before you can use this, you make sure that your editor or jommla does not kill the PHP-code from the template. You should also be aware that such a plugin might be a security problem if your site has a public forum for example.
2) Use the plugin system(Pro only)
The pro version has a simple built in plugin system. Just create a php-file with the name of the desired command and add your output $output - variable. (see examples)
Multiply ammount with value and send it to the output.