Try this:
Click on "HELP" in your admin interface.
Click on "Template Syntax" and then the "GT:Template" link.
In the section called "operators" it talks a bit about mathematical functions and their use. Remember that this entire program is a big PERL script so with a little hacking you can do just about any math in the known universe.