Pre-Defined Formula
A number of functions are built in that you can use with date, time or metric fields. Choose Pre-Defined for the Formula Type to explore what's available.
For any selection, you'll need to:
1) Define the field type as Dimension or Metric
2) Define the value(s) (fields in the view) that the function needs to refer to.
3) Give your field a name (if you didn't at the start) and save.
Custom Formula
To create your own formula, choose Simple as the Formula Type.
You'll now see a formula builder screen like this.
Complex Custom Formulas vs. Sub-queries
Subquery (for complex calcs) vs calculated fields (simple)