Using the "Run Javascript" Action one can perform mathematical operations. For example, the following code
var x = 10;
var y = 2;
var z = x / y;
WSH.Echo(z);
will store the output of the calculation to the variable %JavascriptOutput%.
In order to use the result in further mathematical operations, go on with a "Trim Text" Action to remove the extra empty line that is being returned and then a "Convert Text to Number".