How to add a formula

This tutorial might be interesting: