Simple Math



3rd Party (Commercial)

EE Version Support

  • ExpressionEngine 1.x
  • ExpressionEngine 2


If an item is crossed out, it might be untested, not applicable or incompatible. Contact the developer to be sure.

  • Updater
  • Multi Site Manager
  • Stand Alone Entry Form
  • Low Variables
  • Content Elements
  • Better Workflow
  • Matrix
  • Grid
  • Webservice
  • Publisher


  • jQuery for the Control Panel

Add-On Type(s)



Provides support for doing simple mathematical operations in templates.


1) calculate - Required. Alows you to input a string consisting of numbers,
symbols of mathematical operations and round brackets, e.g
calculate = “(10 + 5) / 3”. Symbols of supported mathematical operations are:
+ (addition), - (subtraction), * (multiplication), / (division),
% (division remainder), ++ (increment),—(decrement).

2) invalid_input - Optional. Accepts two values: “alert” and “silence”.
Default value is “silence”. If the value is “alert”, then in cases when
the plugin has some problem with parameters,  PHP alert is being shown;
if the value is “silence”, then in cases when the plugin has
some problem with parameters, it finishes its work without any alert being shown.
Set this parameter to “alert” for development, and to “silence” - for deployment.

3) var1, var2, var3, var4 ... var48, var49, var50 - Optional. Allows you to input numbers.
Used to gain more security - the values of these parameters will be checked if they really are numbers.
Each these parameters can be used inside “calculate” parameter. E.g. var1=“10” var2=“5” var3=“3” calculate=”({var1} + {var2}) / {var3}”

4) on_non_numeric_vars - Optional. Allows you to specify what variable {math_plus_result} should output in case
some of var1, var2, var3, etc. variables were found to be non numeric.

5) decimal_places - Optional. Specifies how many decimal places the computed number will have.
Default value is 2.

6) decimal_sep - Optional. Specifies what string to use for decimal point in computed number. Default
value is “.”

7) thousand_sep - Optional. Specifies what string to use for thousands separator in computed number.
By default thousands will not be separated.


Use this plugin as folllows:

{exp:simple_math calculate="(10 + 5) / 3"}

Or use it this way:

{exp:simple_math calculate="({var1} + {var2}) / {var3}" var1="10" var2="5" var3="3"}

Format resulting number according your needs:

{exp:simple_math var1="1293.50" var2="1.013" calculate="{var1} * {var2}" decimal_places="2" decimal_

sep=”.” thousand_sep=”,”}

Simple Math Links

This entry was created May 15, 2009, 3:24 pm.
This entry was last updated September 28, 2014, 9:20 am.

Disclaimer: Information about ExpressionEngine add-ons is provided as a service to you, the user, and every member of the ExpressionEngine community. devot:ee is not responsible if you hose, mangle, wreck, or otherwise destroy your EE website by installing an add-on that you found out about at this site, regardless of its rating, Favorites status, commercial or free status, or general popularity. Caveat EEmptor!

Returns: devot:ee has a 30-day return policy on all commercial add-ons sold through If you need to return an add-on, do not go to the developer or the developer's site, but rather visit our returns page at to initiate your return. If you have questions, email

There are no reviews for this add-on yet.

What are you waiting for? Rate it and review it!