What's the name of the iOS / OS X calculator app that has 'variables' functionality?
This sounds like the app Soulver which is available on Mac OS X and iOS.  It allows you to use a mixture of natural language and spreadsheet/calculator functions to perform easily readable equations.