CFor (Calculate FORmula) is a gem for calculating formulas.