The Formula Editor can be used to define a formula that calculates a grade item’s value based on other grade items. When creating a formula, specify which grade items should be included in the formula and the relationships between them. An example of a simple formula is one that calculates the sum of a number of grade items. A more complicated formula is one that drops the minimum or maximum value from a set of grade items.

The Formula Editor is available on the New Item page and Edit Item page for Formula grade items, and the Edit Calculated Final Grade page and Edit Adjusted Final Grade page for the Formula grading system.

Note: Instructors are aided by a previous foundational understanding of programming grammar; however, it is not a requirement. Instructors that need assistance implementing formula grading options should refer to the Support and Training page for 1:1 consultations and help resources.

Access the Formula Editor

  1. Click My Grades on the Navbar and select Grades from the dropdown menu.
  1. Click on the Manage Grades tab.
  1. On the Manage Grades page, click the name of a formula grade item you wish to edit.
  1. Click Edit Using the Formula Editor.
Grades Formula Editor Components
  1. The Formula Area is where the formula text is displayed. The equals sign (=) at the start of the formula cannot be deleted. A cursor shows your position in the formula. Click in the formula area to position the cursor.
  1. The cursor placement icons are used to move the cursor forward and backward in the formula. You can also move the cursor by clicking on the new location with your mouse.
  1. Use the Grade Item drop-down list to view what grade items can be inserted as a parameter in the formula. Numeric, Pass/Fail, Selectbox, and Formula type grade items can all be inserted. You cannot reference the formula grade item you are defining (this avoids a circular reference) or a final grade.
  1. Use the Grade Item Value drop-down list to view the values associated with the grade item you want to use in the formula. There are three options:
    • Points Received The grade the user achieved. E.g., 7 (out of 10 points).
    • Max Points The maximum points available for the grade item. E.g., 10 points.
    • Percent The percent grade the user achieved. E.g., 70%.
  1. Use the insert button next to the Grade Item settings to insert the Grade Item into the formula.
  1. The Function drop-down list contains a list of functions that can be used in the calculation formula:
    • MAX Calculates the maximum (largest) value in a set of values.
    • MIN Calculates the minimum (smallest) value in a set of values.
    • SUM Calculates the sum (total) of a set of values.
    • AVG Calculates the average for a set of values by adding all the values and dividing by the total number of values.
    • IF Operates as a Boolean statement that returns either the value set as true or as false. You must define the condition (Boolean statement), true (then) value, and false (else) value.
    • NOT Operates as a Boolean statement that returns the value set as true if the condition is false and as false if the condition is true.
  1. The right area of the Formula editor contains several operators and a numeric keypad to build the formula. These operators are usually used in conjunction with at least one grade item.
    • AND is used to create a function that considers multiple grade items in a calculation.
    • OR is used to create a function that selects one option from a set of two or more.
  1. The Insert button at the bottom of the editor validates your formula and applies it to the grade book item or final grade you are working on. If your formula is invalid, you receive an error message and your cursor moves to the point in the formula that caused the error. The error type displays in red above the formula. See Grades Formula Editor Validation Errors below for a list of potential errors.
  1. Validate checks if your formula conforms to standard formula grammar. If your formula is valid, a confirmation message displays. If your formula is invalid, you receive an error message and your cursor moves to the point in the formula that caused the error. The error type displays in red above the formula. See Grades Formula Editor Validation Errors below for a list of potential errors.
  1. Preview lets you check how your formula will calculate grades for the first ten users in your user list. Click Close when you are finished viewing the grades. If your formula is invalid, you cannot preview grades.
Grades Formula Editor Validation Errors
ErrorDescriptionExamples
Unexpected [token_type]
e.g., Unexpected operator
The formula contains a function component in an unexpected location= 5=/1
= (5+1)2
Unbalanced parenthesesThe formula contains an opening or closing bracket without a corresponding bracket= 5+1)
Missing end of functionThe formula contains an unclosed function= SUM{[Item1.Points], [Item2.Points]
Unexpected function endThe formula contains a closing bracket for a function that does not relate to a function= [Item1.Points]/2}
Invalid number of operator parametersThe formula contains an invalid number of operator parameters= [Item1.Points] +
Invalid number of function parametersThe formula contains an invalid number of function parameters= SUM{}
= IF{[Item1.Points]<2,5}
Numeric value expectedA Boolean statement or operator was entered in place of a numeric value= IF{5<2,1 OR 1,4}
= SUM{1 = 2,3,4}
Boolean value expectedA Boolean statement was not entered for a condition= IF {MIN{4,5},100,0}
= NOT{4}
Invalid terminalThe formula contains an incorrectly used terminal= [Item1.Points] + 3.2.5
Example Grade Formulas

Scenario 1: Give users who achieved over 75% on all grade items in a category 100% for the category.

= IF {MIN{[GradeItem1.Percent],[GradeItem2.Percent],[GradeItem3.Percent]} < 75, 0, 100}

Scenario 2: Drop the lowest two grades in a set of three grades.

= SUM{[GradeItem1.PointsReceived],[GradeItem2.Points Received], [GradeItem3.Points Received]} - MIN{[GradeItem1.PointsReceived],[GradeItem2.Points Received]} - IF{MIN{[GradeItem2.Points Received], [GradeItem3.Points Received]} = MIN{[GradeItem1.PointsReceived],[GradeItem2.Points Received]},MIN{[GradeItem1.PointsReceived],[GradeItem3.Points Received]}, MIN {[GradeItem2.Points Received],[GradeItem3.Points Received]}}

Scenario 3: Fail users who receive less than 60% on either their midterm or final exam.

= IF {MIN{[Midterm.Percent],[Final.Percent]} < 60, 0, SUM {[A1.Percent],[A2.Percent],[G1.Percent],[G2.Percent],[Midterm.Percent],[Final.Percent]}}