Final Grade Calculator API
Score needed on a final exam to reach a target grade, or the weighted average of graded categories (percentages or points like 43/50).
POST /api/v1/tools/grade-calculatorMCP grade_calculatorCalculatorsFind the score you need on your final exam to reach a target grade, or work out a weighted average from category weights and scores such as 42/50.
Input
Send these as a JSON object. Unknown fields are rejected.
- mode
- final: score needed on the final. weighted: weighted average of categories. (string, one of final, weighted, default "final")
- current
- final mode: current grade before the final, in percent. (number, 0 to …)
- target
- final mode: overall grade wanted, in percent. (number, 0 to …)
- finalWeight
- final mode: the final's share of the overall grade, in percent (more than 0, up to 100). (number, 0 to 100)
- categories
- weighted mode: JSON array of {"name": string (optional), "weight": percent, "score": "87" | "87%" | "43/50"}. Weights need not add up to 100; each is scaled to its share. (string, up to 20000 characters)
curl https://pithlab.com/api/v1/tools/grade-calculator \n -H "Authorization: Bearer $PITHLAB_KEY" \n -H "Content-Type: application/json" \n -d '{"mode":"final","current":82,"target":85,"finalWeight":30}'Example response
{
"ok": true,
"result": {
"required": 92,
"status": "possible",
"text": "You need 92% on the final to finish with 85%"
}
}