Weighted averages and final grades
Most grading systems need at least one number MarkBook works out for you: a term average, a weighted category grade, an annual mark. In MarkBook that is a calculated column. This page explains how formulas read the grid, gives a formula for each common rule, and shows how to carry a result from one term into the next.
Where: a calculated value type is created under Configuration → Assessment → Markbook Templates → Columns Configurations with Data type Calculated. Its formula is set per template: open the template, Template settings tab, and click the calculated column in its zone. The formula panel has three tabs: Arithmetic, Weighted and Advanced. You need the Markbook templates or Value types permission. See also Calculated Columns & Formulas.
How a formula reads the grid
- It names columns by short label.
TSTmeans the column whose Short label is TST. A label with spaces goes in square brackets:[End of Year Grade]. - It reads the same pupil and the same subject. A formula never reaches into another subject.
- It reads the same checkpoint. In Term 2,
TSTmeans Term 2's TST. If the column has no Term 2 cell, the formula uses the column's year-level (Target area) cell, or its only cell. - It reads a number from every cell.
| Column | Number the formula gets |
|---|---|
| Number | The number typed |
| Grade label | The grade's Weight (points): GCSE 7 → 7, A− → 3.7, 5− → 4.75 |
| Judgement scale | The value's Weight or Numeric value |
| Yes / No | 1 or 0 |
| Calculated | Its result, before display rounding |
- Averages use the marks that exist; arithmetic needs every value.
avg(),min(),max()and the Weighted tab leave a missing mark out.avg(N1, N2, N3, N4)with N3 empty is (N1 + N2 + N4) / 3. If all the marks are missing, the result is empty. Plain arithmetic (A - B,A * 0.4 + B * 0.6) andsum()stay empty if any value is missing. MarkBook never replaces a missing mark with zero. To average marks where some may be missing, writeavg(...)or use the Weighted tab, not(A + B + C) / 3.
The three tabs
| Tab | What it does | Result shown as |
|---|---|---|
| Arithmetic | Pick columns and operators (Add, Subtract, Multiply, Divide) in a row | Whole number |
| Weighted | Weighted average, Drop lowest, then average, Lowest (min) or Highest (max) over a list of columns, each with a Weight | Number with 0–4 Decimals |
| Advanced | Type an expression | Number with 0–4 Decimals, or Signed (+2 / −1) |
The Arithmetic tab has no "times before plus"
It works strictly left to right: A + B × C means (A + B) × C. For anything with more than one kind of operator, use the Advanced tab, which follows normal maths rules and brackets.
Use Advanced for brackets, functions and a signed display. Use Weighted for a weighted average when marks can be missing. Most examples below use Advanced. Press Preview with test values to try a formula with sample marks before you save.
Functions on the Advanced tab
| Function | Example | Result |
|---|---|---|
avg(a, b, …) | avg(7, 8, 9) | 8 |
sum(a, b, …) | sum(2, 3) | 5 |
min(a, b, …) / max(a, b, …) | max(6, 9) | 9 |
round(x) / round(x, n) | round(8.5) / round(4.446, 2) | 9 / 4.45 |
floor(x) / ceil(x) | floor(8.9) / ceil(8.1) | 8 / 9 |
abs(x) | abs(-2) | 2 |
clamp(x, low, high) | clamp(112, 0, 100) | 100 |
Operators: + - * / and brackets. round sends .5 away from zero (8.5 → 9, −1.5 → −2). A formula may be up to 500 characters, name up to 32 columns, and give a function up to 16 values.
Formulas for common rules
Plain average
avg(N1, N2, N3, N4)Weighted average with weights that add to 1 (US categories)
0.1*HW + 0.2*QZ + 0.4*TST + 0.2*PRJ + 0.1*PARTWeighted average with whole-number weights (Polish średnia ważona)
(3*S1 + 3*S2 + 2*K1 + 2*K2 + 2*O1 + Z1 + A1) / 14Divide by the sum of the weights (here 3+3+2+2+2+1+1 = 14).
On the Weighted tab you can enter the same weights in the Weight column. Weights there are relative: 3, 2, 1 works as well as 50%, 33%, 17%, and the Share column shows each one's real share. Set Decimals to 2. Unlike the formula above, the Weighted tab leaves a missing mark out and re-divides by the weights that are present. Tests 50%, quizzes 30%, homework 20% with homework missing: tests count 50/80 and quizzes 30/80.
Drop the lowest
(Q1 + Q2 + Q3 + Q4 - min(Q1, Q2, Q3, Q4)) / 3Or the Weighted tab, Drop lowest, then average, Drop 1. This one is a plain average of the marks that are kept; the weights are not used. It also copes with a missing quiz and never drops the last remaining mark. The formula above stays empty if any quiz is missing.
Best mark
max(EXAM, RESIT)A raw score as a percentage
T1 / 40 * 100Coursework and exam, 40 / 60
0.4*CW + 0.6*EXAMRounding the way your country does
| Country | Rule | Formula | Decimals |
|---|---|---|---|
| Romania | Annual average: mean of all the year's marks, rounded to the nearest whole number, .50 up | round(avg(N1, N2, N3, N4, N5, N6, N7)) | 0 |
| Poland | Weighted average shown to two decimals | (3*S1 + … ) / 14 or the Weighted tab | 2 |
| Bulgaria | Average to two decimals, read against the bands | avg(T1, T2, T3, T4) | 2 |
| Bulgaria | Whole mark from an average, .50 up | round(avg(T1, T2, T3, T4)) | 0 |
| US | Percentage to one decimal | 0.1*HW + … | 1 |
| Any | Always round down | floor(avg(A, B, C)) | 0 |
Decimals only changes how the result is shown. Another formula that reads the column gets the full value. To pass a rounded value on, round inside the formula, as a Bulgarian term mark does.
Carrying a result into the next term: the annual average
Because a formula reads its own checkpoint, an annual average cannot simply say "average of the term averages" with one term-average column. Use one column per term, each kept in its own term:
- Create one calculated value type per term, for example
Average term 1(AV1) andAverage term 2(AV2), both Repeated in every reporting period, with the same formula. - Add both to the Reporting period zone. In the Live preview, disable
AV1in Term 2 andAV2in Term 1. - Create the annual column, Only in the final reporting period, with
avg(AV1, AV2).
AV1 exists only in Term 1, so the annual formula finds it there. (Romania no longer needs this: since 2024 it closes one annual average over the whole year, so one period is enough.) The same pattern gives a US semester grade (0.4*Q1G + 0.4*Q2G + 0.2*EX1) and a Bulgarian annual guide (avg(SO1, SO2), where SO1 and SO2 are term marks the teacher picks).
A formula can read another calculated column, as the annual column reads AV1. Formulas must not refer to each other in a loop.
Showing the result
- A calculated column shows a number, not a grade label. To show the grade too, keep a grade-label column beside it (Report Grade, Ocena roczna, Годишна оценка) for the teacher to fill in, or colour the number.
- Colour bands. Edit the calculated value type, turn on Colour-code this column by its value, and add up to eight bands. Each band includes its From value and stops just before its Up to value, so bands 4.5–5.5 and 5.5–(No limit) meet without a gap. See Conditional Colours.
- Calculated columns are never typed into. Their cells are read-only in the grid, and a change to any mark updates them at once.
Worked example: a weighted term mark
Science, Term 1, weights: practical 20%, two tests 30% each, homework 20%.
| Column | Short label | Mark |
|---|---|---|
| Practical | PRAC | 72 |
| Test 1 | T1 | 65 |
| Test 2 | T2 | 81 |
| Homework | HW | 90 |
Formula on the Advanced tab, Decimals 1:
0.2*PRAC + 0.3*T1 + 0.3*T2 + 0.2*HWResult: 14.4 + 19.5 + 24.3 + 18 = 76.2. If Test 2 were still unmarked, the cell would stay empty until it is entered.