https://www.youtube.com/watch?v=51JXFjaZF6k
Open the Logic modal in the bottom-right of your form editor.

Click Calculations followed by + New calculation. Here, you’ll be able to add, edit, and delete calculations in your form.

Add your calculation by giving it a Name and Type. The name refers to how you’ll refer to it in-app, whereas the type can either be one of these:
Then, provide an Initial value for your calculation.
Every calculation has some value that it starts with, e.g. defining what a variable starts out as. Some common examples: