Choose formula type when you set up the column. Then click on any cell in that column (not the heading). A box pops up where you can create your formula.
The Notion Formula Cheat Sheet
To sum to columns:
Here I am checking to see if one value is larger than another. In the second formula, I add a test to see if the values are equal before I check to see which is larger.