# GPA Calculator

> Computes a grade point average as the credit-weighted mean of course grade points (quality points divided by total credits), with an unweighted average when credits are omitted, and the nearest US letter grade on the 4.0 scale.

- Calculator id: `gpa` · Category: Everyday Life (`everyday`) · Tool name: `calculate_gpa`
- Canonical page: https://tttkmbb.com/everyday/gpa · This document: https://tttkmbb.com/everyday/gpa.md · JSON definition: https://tttkmbb.com/everyday/gpa.json

## Purpose

Computes a grade point average as the credit-weighted mean of course grade points (quality points divided by total credits), with an unweighted average when credits are omitted, and the nearest US letter grade on the 4.0 scale.

**Use when:** You have grade points (e.g. A = 4.0, B+ = 3.3) and credit hours for several courses and want the semester or cumulative GPA.

**Do not use when:** You need the score required on a final exam (use final-grade), or a general weighted mean of other quantities (use weighted-average).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `grade_points` | number_list |  | required | Grade points for each course on your scale, e.g. 4.0 for A, 3.7 for A−, 3.3 for B+, 3.0 for B, 2.0 for C, 1.0 for D, 0 for F. |
| `credits` | number_list |  | optional | Credit hours for each course, in the same order. Omit for an unweighted average (every course counts once). |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `gpa` | number |  | Σ(grade_points × credits) / Σ credits. |
| `total_credits` | number | credits | Sum of credits (number of courses when credits are omitted). |
| `total_quality_points` | number |  | Σ(grade_points × credits). |
| `courses` | integer |  | Number of courses included. |
| `letter_grade_equivalent` | string |  | Letter whose standard 4.0-scale value (A 4.0, A− 3.7, B+ 3.3 …) is closest to the GPA; only returned when all grade points are ≤ 4.3. |

## Formula

`GPA = Σ(grade_points_i × credits_i) / Σ credits_i; without credits GPA = mean(grade_points)`

Uses the common US 4.0 scale mapping (A 4.0, A− 3.7, B+ 3.3, B 3.0, B− 2.7, C+ 2.3, C 2.0, C− 1.7, D+ 1.3, D 1.0, F 0). Institutions differ on A+ (4.0 or 4.3) and on weighting honours/AP courses; use your school's point values.

## Data Sources

- College Board – How to Convert Your GPA to a 4.0 Scale — https://pages.collegeboard.org/how-to-convert-gpa-4.0-scale (reference, retrieved 2026-09-23)
- Academic grading in the United States (Wikipedia) — https://en.wikipedia.org/wiki/Academic_grading_in_the_United_States (reference, retrieved 2026-09-23)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/gpa?grade_points=…`
- `POST https://tttkmbb.com/api/v1/calculate/gpa` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/gpa · OpenAPI operationId `calculate_gpa` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "gpa", "inputs": {…}}`

## Example

- A, A−, B+, A with 3, 4, 3, 3 credits: inputs `{"grade_points":[4,3.7,3.3,4],"credits":[3,4,3,3]}` → `{"gpa":3.75,"total_credits":13,"total_quality_points":48.7,"courses":4,"letter_grade_equivalent":"A-"}`
- Unweighted: 3.0, 2.7, 4.0, 3.3: inputs `{"grade_points":[3,2.7,4,3.3]}` → `{"gpa":3.25,"total_credits":4,"total_quality_points":13,"courses":4,"letter_grade_equivalent":"B+"}`

```
GET https://tttkmbb.com/api/v1/calculate/gpa?grade_points=4%2C3.7%2C3.3%2C4&credits=3%2C4%2C3%2C3
```

## Limitations

You need the score required on a final exam (use final-grade), or a general weighted mean of other quantities (use weighted-average). Uses the common US 4.0 scale mapping (A 4.0, A− 3.7, B+ 3.3, B 3.0, B− 2.7, C+ 2.3, C 2.0, C− 1.7, D+ 1.3, D 1.0, F 0). Institutions differ on A+ (4.0 or 4.3) and on weighting honours/AP courses; use your school's point values. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I combine a previous cumulative GPA with new courses?**

Enter the old GPA as one 'course' with grade_points = old GPA and credits = total credits already completed, then add the new courses.

**Do pass/fail or withdrawn courses count?**

Usually not: they carry no grade points and are excluded from both quality points and credits. Leave them out.

## Related

- [Final Grade Calculator](https://tttkmbb.com/everyday/final-grade.md) — Score needed on a final exam to reach a target course grade.
- [Weighted Average Calculator](https://tttkmbb.com/statistics/weighted-average.md) — General weighted mean of any values.
