With the Formulas tool, you can take the information that's been added to a process through a Collect Information step and manipulate it with math. For example, you might want to calculate the cost of a building permit based on the size of the square footage of a building, or you might want to add up multiple numbers to create a total amount.
You access the Formulas tool from the "More" section on the Edit pane of a Template.
Once you open it up, you create a name for your new formula, then add in field data and mathematical operators ( +, -, x, / ) to get the number you're looking for. If you've already made one formula, you can use it in a second formula (nested calculations). You can also use values from total surveys collected in a Survey step (if there is one present in your template).
You're only able to use required fields or fields with Default values in Formulas. if a field is marked "optional" it won't show up in the list of choices to use as terms in your formula unless you've set a Default value for it. You are able to use fields that appear in conditional sections in formulas, as long as they're either set as required or have a pre-set Default value.
Check out this video overview of setting up formulas (and how to use them in Payment steps):