Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

GPA Calculator API

US-style GPA on a 4.0 scale from letter grades and credits, optionally weighted for honors/AP courses and combined with a previous cumulative GPA.

POST /api/v1/tools/gpa-calculatorMCP gpa_calculatorCalculators

Calculate your semester GPA from letter grades and credits on a 4.0 scale, with optional honors and AP weighting and a cumulative GPA that includes past terms.

Input

Send these as a JSON object. Unknown fields are rejected.

courses
JSON array of courses, each {"grade": "A+"…"F" (A+, A, A-, B+, B, B-, C+, C, C-, D+, D, D-, F), "credits": number, "level": "regular" | "honors" | "ap" (optional), "name": string (optional)}. Up to 200 courses. (string, up to 50000 characters, required)
weighted
Add +0.5 for honors and +1.0 for AP/IB courses (not for F). (boolean, default false)
aPlusIs43
Count A+ as 4.3 instead of 4.0. (boolean, default false)
priorGpa
Optional previous cumulative GPA, to also return the new cumulative GPA (give priorCredits too). (number, 0 to 5.3)
priorCredits
Credits behind priorGpa. (number, 0 to …)
curl https://pithlab.com/api/v1/tools/gpa-calculator \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"courses":"[{\"name\":\"Calculus\",\"grade\":\"A\",\"credits\":4},{\"name\":\"History\",\"grade\":\"B+\",\"credits\":3},{\"name\":\"Chemistry\",\"grade\":\"A-\",\"credits\":4,\"level\":\"honors\"}]"}'
Example response
{
  "ok": true,
  "result": {
    "gpa": 3.7,
    "credits": 11,
    "qualityPoints": 40.7,
    "courses": 3,
    "text": "Semester GPA 3.70 over 11 credits"
  }
}