Math Formula Calculation

@tsmakrakis

This great method by @eli should help!