In Question and Page nodes you can assign a static value to a field dependent on the answer. 

From version 1.11 it’s possible to use formulas instead of static values.

Your formula has to be in this format : eval( YOUR_FORMULA )

If you use fields in your formula you have to surround  the field name with curly brackets. Today you may NOT use spaces between the bracket and the field name.

Formula function uses the functionality from the eval function from Javascripts.

Use default values and required fields to ensure that your formula will work. If there is an error in the formula, the user won’t be able to answer the question and contunue.

If you need more complex calculations, more than one result variable, or need to use data from other objects, then call a flow and make your calculation there.