You can add Excel-style formulas.

https://support.google.com/docs/answer/46977?hl=en