Simple calculated questions are individual numerical questions based on a formula using variables or "wildcards" (i.e {x} , {y}). These wildcards are based on a set of pre-generated values making it possible for respondents to see different values for the same question.
Example of a simple calculated question:

- In the Question Bank, select the desired question category, then click Create a new question... and select Calculated simple and click Next. The Adding a question screen opens.
- Give the question a descriptive name - this makes it easy to identify it in the question bank. The question name is not visible to students.
- Enter question text, include any wild cards (variables) surrounded by curly brackets (e.g., {b} and {h}).
Example: What is the surface of a rectangle in square meters with a base of {b} m and a height of {h} m ?
- Enter the Correct answer formula ?using the same wild cards as the question text in order to define how a correct answer will be calculated.
Example: {b}*{h}
- Set Grade for the correct answer to 100%.
- Tolerance will accept answers as correct if they are within a certain range of the correct answer (+/- the tolerance). Set the value for this field; to only accept the exact correct answer, enter 0.
- To choose the number of decimal places for the correct answer, set Correct answer shows. Moodle rounds the correct answer to the number of places set.
- To generate wildcards (the set of variables that will be substituted in the Correct answer formula) click Find the wild cards {x..} present in the correct answer formulas. The page reloads.
- Scroll down to Wild cards parameters used to generate the values. Set the range of values for each wildcard. When Moodle generates a random value for this wildcard, it will fall within this range. Update wildcard parameters.
- Next to Generate, choose the number of sets you want to generate. This corresponds to the total number of random values for each wildcard. Next to Display, to choose how many of these wildcard sets you want to preview. Click Generate. The page reloads, showing the new sets of wildcard values.
- To change any wild card values, type in new values then click Update the wild card(s) values, and the new values save. When finished, scroll to the bottom of the page and click Save changes to save the question to the category.
After creating a question, be sure to check to make sure the question works correctly. Click the magnifying glass icon
next to the question in the Question bank to view a preview of the new question.
For additional instructions on setting up this question type, see Simple calculated question type on Moodle Docs.