Last updated on September 17, 2026
Formula questions are an easy way for math and science instructors to create numerically-randomized questions for their students. To make a formula question, the instructor adds a mathematical formula with variables and variable ranges to the quiz question. The value of the variable will be different for every quiz attempt. This means that students will get different questions every time they retake the quiz, providing them with additional unique problem-solving opportunities without requiring instructors to write a large number of questions.
Best Practices
- Thoughtfully set minimum and maximum values for each variable to avoid errors (such as dividing by zero).
- Consider allowing students multiple attempts on quizzes with formula questions so that they can learn from their mistakes without repeating the same questions.
- Make sure that students know how many decimal places or significant figures they should use in their answers.
- Remember to use an accessible method like a math equation editor, inline LaTeX, or an image with descriptive alt text to write all student-facing formulas.
- View our tutorial, Use MathJax and LaTeX to Display Equations in Canvas, for more guidance on writing formulas in the RCE.
- Make sure to follow the directions for the correct quiz type. Classic Quizzes require brackets [a] around variables, while New Quizzes require backticks `a`.
Let’s walk through it together
[Length 5:19, CC Available]
- Log in to your Canvas Account.
- Select the Course you’d like to work in.
- Click Quizzes on the left-hand course navigation menu.
- Click the Name of the quiz you wish to add a formula question to.
- Note: Classic Quizzes have an outline of a rocket, while New Quizzes have a filled in rocket.
- View our tutorials, Create and Edit Classic Quizzes or Create and Edit New Quizzes, for steps on creating a quiz.
Create a Formula Question in a Classic Quiz
- Click the name of the quiz you wish to add the question to.
- Click Edit.
- Click the Questions tab at the top of the page.
- Click the +New Question button at the bottom of the page.
- Type a Question Title, if desired.
- Select Formula Question from the drop-down menu.
- Type the question prompt into the Rich Content Editor. Define each variable that you wish to have replaced by a number for students using square brackets.
- Example: What is 5 plus [x]?
- Note: Click Need Help? under Question, then select Functions to view a list of functions that Canvas supports.
- Type a backslash and parenthesis before and after longer equations.
- Example: Calculate the derivative of:
\([a]x^3+[b]x^2+[c]x+[d]\) when x is equal to 2. - Note: An accessible method should be used to typeset all mathematical symbols and superscripts. The example above uses inline LaTeX by adding a backslash and parenthesis before and after the equation.
- For steps on using the Equation Editor in the RCE to help with this step, view the section Use the Equation Editor, below.
- Example: Calculate the derivative of:
- Press Enter on your keyboard.
- Scroll down to the Variable Definitions area that appears.
- Type the minimum value, maximum value, and number of decimal places for each variable.
- Click Recompute to view examples of the values Canvas could insert into the equation.
- Type the formula that Canvas should use to compute the answer into the Formula box. Use the same variables as defined above.
- Note: Do not use brackets or equal signs in the formula.
- Note: You may use operators such as + (add), – (subtract), * (multiply), / (divide), and ^ (power).
- Example #1: 5 + x
- Example #2: 12*a + 4*b + c
- Note: these equations do not need to be typeset, as they will never be viewed by students.
- Select the number of decimal places you want used for the result from the drop-down menu.
- Click Save to the right of the Formula.
- Check that the Result is correct given the Example Values listed above.
- Note: If you get an “Unexpected variable” error, check that you are not using brackets or equal signs, and make sure you have entered the operators as described in Step 10. Re-enter the formula and click Save again.
- Click the X next to the result to delete the formula.
- Note: If you get an “Unexpected variable” error, check that you are not using brackets or equal signs, and make sure you have entered the operators as described in Step 10. Re-enter the formula and click Save again.
- Enter the number of possible solutions you wish to generate in the “Offer [number] possible value combinations” box.
- If you prefer to have each student have different value combinations, enter a number that is more than the total number of students in your class.
- Enter the margin of error you will permit for student responses in the “error margin of +/- [number]” box.
- Click Generate to the right of the error margin field.
- Click Update Question.
- Repeat Steps 4-19 for any Formula Questions you wish to add to your quiz.
- Click Save at the bottom right of the screen.
Create a Formula Question in a New Quiz
- Click the name of the quiz you wish to add the question to.
- Click Build at the bottom right of the page.
- Click the blue + icon.
- Select the Formula question type.
- Type a Question Title, if desired.
- Type the question prompt into the Add Question Stem box. Define each variable that you wish to have replaced by a number for students using backticks.
- Example #1: What is 5 plus `x`?
- Type a backslash and parenthesis before and after longer equations.
- Example: Calculate the derivative of:
\(`a`x^3+`b`x^2+`c`x+`d`\) when x is equal to 2. - Note: An accessible method should be used to typeset all mathematical symbols and superscripts. The example above uses inline LaTeX by adding a backslash and parenthesis before and after the equation.
- For steps on using the Equation Editor in the RCE to help with this step, view the section Use the Equation Editor, below.
- Example: Calculate the derivative of:
- Scroll down to the Answers area that appears.
- Type the minimum value, maximum value, and number of decimal places for each variable.
- Type the formula that Canvas should use to compute the answer into the Formula Definition box. Use the same variables as defined above.
- Note: Do not use backticks or equal signs in the formula.
- Note: You may use operators such as + (add), – (subtract), * (multiply), / (divide), and ^ (power).
- Example #1: 5 + x
- Example #2: 12*a + 4*b + c
- Note: These equations do not need to be typeset, as they will never be viewed by students.
- Enter the number of possible solutions you wish to generate in the Number of Solutions box.
- If you prefer to have each student have different value combinations, enter a number that is more than the total number of students in your class.
- Enter the number of decimal places you wish to use for the solution in the Decimal Places box.
- Select Display as Scientific Notation, if desired.
- Select the margin type (Absolute or Percent) from the drop-down menu.
- Enter the accepted margin of error in the +/- margin of error box.
- Click Generate.
- Review the variable combinations and results that appear. Ensure they are correct.
- Adjust options, including on-screen calculator, item banking, possible points, and feedback, if desired.
- Click Done.
Use the Equation Editor
The Equation Editor is a tool to help create math formulas in the RCE. However, it produces an image of the formula rather than plain editable text, making it so Canvas won’t recognize the variable to replace with values. These steps go over how to use the Equation Editor to create a formula you can copy and paste into the RCE.
- Type the question text into the RCE.
- For example: Calculate the derivative of…
- Click the Equation Editor Icon (square root of x) from the toolbar above the RCE.
- Note: If you do not see the Equation Editor Icon, click the three dots at the far right of the RCE toolbar.
- Type any variables directly into the equation textbox.
- Select a symbol category from the tabs at the top of the Equation Editor pop-up.
- Click a symbol to insert it into the equation box below the tabs.
- Click into any placeholder boxes that appear and enter numbers or variables into them.
- Note: Press the right arrow key on your keyboard to exit the placeholder box.
- Click the Directly Edit LaTeX toggle to turn it on.
- Highlight the formula in the equation field.
- Right click your mouse and select Copy to copy the formula.
- Click Cancel to exit out of the Equation Editor.
- Right click your mouse on the RCE where you want the formula to appear and select Paste.
- Type brackets (Classic Quizzes) or backticks (New Quizzes) around any variable you want replaced by random values.
- Type a backslash and parenthesis before and after the formula.
- Example: \(`a`x^3+`b`x^2+`c`x+`d`\)



Have Questions?
Need additional support on this or other teaching and learning topics? Please visit us for drop-in support or try one of our self-help tutorials.
Ready to take your teaching to the next level? Opt into our Connections with CTLD newsletter!