Create calculator expressions

Use the Calculator to do arithmetic operations, comparison operations, logical operations, functions, and column operations. You can calculate the operation one time or assign it as a formula to a column or constant.

Create a calculator expression

  1. Choose Calc > Calculator.
  2. In Store result in variable, enter the column or constant where you want to store the result of the expression.
  3. With the insertion point in Expression, select variable names, buttons, and functions to build your expression. To set functions to their default values, omit the arguments at the end of the functions.
  4. Select Assign as a formula if you want to assign the formula to the column. When you assign a formula to a column, Minitab recalculates values automatically whenever you add, remove, or change associated data.
  5. Click OK.

Order of operations

Operations are done row-wise. Minitab conducts operations in the following order: subscripts, functions and column operations, exponentiation, "Not", multiplication and division, addition and subtraction, comparison operations, "And", and "Or". Operations of equal order are performed from left to right.


You can override the default precedence by using parentheses. Minitab runs expressions within ( ) first.

Expression guidelines

Expressions may include columns, stored constants, numbers, and text, but not matrices.

In an expression, you cannot use a hyphen (-) to specify a range of values. For example, Minitab interprets C1-C4 as C1 minus C4.
Text values
Enclose specific text values, such as "green", with double quotation marks.
Numeric values
You do not need to enclose numbers with any characters.
Numeric data in currency or percentage format
Numeric data in currency or percentage format are primarily for display and may be used as input only with selected functions. For example, you cannot use the logical function ANY (C1, $3.50) to flag the value $3.50 in column C1 because the function does not recognize the currency symbol $.
Missing values
Denote missing text values with a pair of double quotation marks with no space between them, for example: C1 = "". Denote missing numbers or date/time values with the missing value symbol * enclosed in single quotation marks.
Wildcard characters with text functions

Use an asterisk (*) to represent a string of one or more characters. Use a question mark (?) to represent only one character.

To reference the "*" or "?" character in a text string, use the tilda (~) before the symbol.

Single value in a column
Specify a single value in a column by enclosing the row number of the data value in brackets. For example, if column C5 is named Revenue, the expression 'Revenue'[27] or C5[27] returns the value in row 27 of the column.
Parentheses ( )
To combine multiple operations in a complex expression use parentheses; for example, (C1 + C2)/(C2-C6). You can also use parentheses to identify the value or column of values for a function; for example. SIN (3.5) or SIN (C1).

Calculator output

Numeric data
If the last operation evaluated in an expression is a numeric operation such as minus or MEAN, Minitab stores the result as a number. For example, the result of TODAY() - 30 is a number because the last operation evaluated is minus, a numeric operation.
Numeric data in currency or percentage format
A function that can recognize data in currency or percentage format as input may not store the currency or percentage symbol with the result. For example, if you use the function SUM to add a column of data values in currency format, Minitab will return the sum of the values but not their associated currency symbol. If you store the result in a column, however, you can choose Editor > Format Column, then select Currency or Percentage as the type to format the column as currency or percentage and display the symbol.
Date/Time data

If the last operation evaluated is a date/time function, such as NOW or WHEN, Minitab stores the result as a date/time value. For example, the result of DATE(TODAY() - 30) is a date value, because the last operation evaluated is DATE, a date/time function.

In Minitab, as with most spreadsheets, if you operate on a date/time variable with a number; for example, NOW() + 30, Minitab assumes the number is in units of days.

Missing values
When Minitab cannot calculate an expression (for example, because the input is a missing value or because you try to compute the square root of a negative number) the result is set to missing. Minitab uses the missing value symbol * for a numeric column and a blank for a text column.
Stored constants
Stored constants do not recognize date/time values, only numbers. Because date/time values are stored internally as numbers, date/time values stored in a constant are the numeric equivalent of the corresponding date/time value.
True/False comparisons or expressions
If an expression or comparison is true, the result is set to 1. If it is false, the result is set to 0.
By using this site you agree to the use of cookies for analytics and personalized content.  Read our policy