{
  "id": "gpa",
  "version": "b3e9d6dbe8da",
  "status": "published",
  "name": "GPA Calculator",
  "question": "What is my GPA?",
  "summary": "Computes a grade point average (GPA) on the 4.0 scale from letter grades and credit hours, and a cumulative GPA with earlier terms.",
  "category": "education",
  "subcategory": "gpa",
  "url": "https://www.acalculator.org/education/gpa-calculator",
  "markdown": "https://www.acalculator.org/education/gpa-calculator.md",
  "kind": "function",
  "method": "GPA = Σ(grade points × credits) ÷ Σ(credits); cumulative GPA = (GPA so far × credits so far + Σ(grade points × credits)) ÷ (credits so far + Σ(credits)).",
  "assumptions": [
    "Grade points follow the University of Michigan-Dearborn 4.0 scale: A+ and 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, D- 0.7, F (or E) 0.0.",
    "Courses marked Not counted (pass, withdrawal, incomplete) are left out of both the grade points and the credits; an F counts with 0 points.",
    "The GPA is shown to two decimal places, rounded. Some schools cut off (truncate) instead, so a GPA of 3.4846 can show as 3.48.",
    "This is an unweighted GPA: honors and AP courses get no extra points."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "grade1": {
        "title": "Course 1 grade",
        "description": "The letter grade in course 1, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits1": {
        "title": "Course 1 credits",
        "description": "The credit hours of course 1.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade2": {
        "title": "Course 2 grade",
        "description": "The letter grade in course 2, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits2": {
        "title": "Course 2 credits",
        "description": "The credit hours of course 2.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade3": {
        "title": "Course 3 grade",
        "description": "The letter grade in course 3, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits3": {
        "title": "Course 3 credits",
        "description": "The credit hours of course 3.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade4": {
        "title": "Course 4 grade",
        "description": "The letter grade in course 4, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits4": {
        "title": "Course 4 credits",
        "description": "The credit hours of course 4.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade5": {
        "title": "Course 5 grade",
        "description": "The letter grade in course 5, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits5": {
        "title": "Course 5 credits",
        "description": "The credit hours of course 5.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade6": {
        "title": "Course 6 grade",
        "description": "The letter grade in course 6, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits6": {
        "title": "Course 6 credits",
        "description": "The credit hours of course 6.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade7": {
        "title": "Course 7 grade",
        "description": "The letter grade in course 7, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits7": {
        "title": "Course 7 credits",
        "description": "The credit hours of course 7.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "grade8": {
        "title": "Course 8 grade",
        "description": "The letter grade in course 8, or Not counted for a course that does not count toward the GPA.",
        "type": "string",
        "enum": [
          "a-plus",
          "a",
          "a-minus",
          "b-plus",
          "b",
          "b-minus",
          "c-plus",
          "c",
          "c-minus",
          "d-plus",
          "d",
          "d-minus",
          "f",
          "none"
        ]
      },
      "credits8": {
        "title": "Course 8 credits",
        "description": "The credit hours of course 8.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 30
      },
      "priorGpa": {
        "title": "GPA so far",
        "description": "Your cumulative GPA before this term, on the 4.0 scale.",
        "type": "number",
        "minimum": 0,
        "maximum": 4
      },
      "priorCredits": {
        "title": "Credits so far",
        "description": "The credit hours that count toward your GPA so far.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 1000
      }
    }
  },
  "outputs": {
    "gpa": {
      "label": "Your GPA",
      "description": "The grade points of the courses divided by their credits, on the 4.0 scale.",
      "format": "number"
    },
    "credits": {
      "label": "Credits",
      "description": "The credits of the courses that count toward the GPA.",
      "format": "number"
    },
    "points": {
      "label": "Grade points",
      "description": "The sum of grade points × credits over the courses.",
      "format": "number"
    },
    "cumulative": {
      "label": "Cumulative GPA",
      "description": "The GPA over the earlier terms and these courses together.",
      "format": "number"
    },
    "totalCredits": {
      "label": "Total credits",
      "description": "Credits so far plus the credits of these courses.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "grade1": "a",
      "credits1": 3,
      "grade2": "b-plus",
      "credits2": 4,
      "grade3": "a-minus",
      "credits3": 3,
      "grade4": "b",
      "credits4": 3,
      "grade5": "none",
      "credits5": 3,
      "grade6": "none",
      "credits6": 3,
      "grade7": "none",
      "credits7": 3,
      "grade8": "none",
      "credits8": 3
    },
    "outputs": {
      "gpa": 3.4846153846153842,
      "credits": 13,
      "points": 45.3
    },
    "text": "Your GPA is 3.48 over 13 credits."
  },
  "examples": [
    {
      "given": {
        "grade1": "b-plus",
        "credits1": 3,
        "grade2": "c",
        "credits2": 4,
        "grade3": "a",
        "credits3": 3,
        "grade4": "none"
      },
      "expect": {
        "gpa": 2.99,
        "credits": 10,
        "points": 29.9
      },
      "source": "https://registrar.wsu.edu/grades-and-gpa/ (29.9 ÷ 10 = 2.99); hand calculation in content.mdx"
    },
    {
      "given": {
        "grade1": "a",
        "credits1": 3,
        "grade2": "b-plus",
        "credits2": 4,
        "grade3": "a-minus",
        "credits3": 3,
        "grade4": "b",
        "credits4": 3
      },
      "expect": {
        "gpa": 3.4846153846153847,
        "credits": 13,
        "points": 45.3
      },
      "source": "hand calculation in content.mdx: 45.3 ÷ 13 = 3.4846"
    },
    {
      "given": {
        "grade1": "a",
        "credits1": 3,
        "grade2": "b-plus",
        "credits2": 4,
        "grade3": "a-minus",
        "credits3": 3,
        "grade4": "b",
        "credits4": 3,
        "priorGpa": 3.2,
        "priorCredits": 30
      },
      "expect": {
        "gpa": 3.4846153846153847,
        "cumulative": 3.286046511627907,
        "totalCredits": 43
      },
      "source": "hand calculation in content.mdx: (3.2 × 30 + 45.3) ÷ 43 = 3.2860"
    },
    {
      "given": {
        "grade1": "a-plus",
        "credits1": 4,
        "grade2": "d-minus",
        "credits2": 2,
        "grade3": "none",
        "credits3": 3,
        "grade4": "f",
        "credits4": 1
      },
      "expect": {
        "gpa": 2.4857142857142853,
        "credits": 7,
        "points": 17.4
      },
      "source": "University of Michigan-Dearborn grading system (A+ 4.0, D- 0.7, E 0.0); hand calculation in content.mdx"
    }
  ],
  "sources": [
    "University of Michigan-Dearborn, Grading System (4.0 scale: A, A+ 4.0 through E 0.0; GPA = honor points ÷ hours; P, W, NC not computed). https://catalog.umd.umich.edu/academic-policies-campus/grading-system/grading-system.pdf",
    "Washington State University, Office of the Registrar, Grades and GPA (worked example: 29.9 points ÷ 10 credits = 2.99). https://registrar.wsu.edu/grades-and-gpa/",
    "University of Illinois Urbana-Champaign, Office of the Registrar, Calculate Your GPA (35 quality points ÷ 16 hours = 2.1875, shown as 2.18). https://registrar.illinois.edu/courses-grades/calculate-your-gpa/",
    "Arizona State University, Registrar, GPA calculator (A+ 4.33, A- 3.67, B+ 3.33). https://registrar.asu.edu/grades-and-records/gpa-calculator",
    "University at Buffalo, Office of the Registrar, Calculate GPA (A- 3.667, B+ 3.333). https://www.buffalo.edu/registrar/classes-and-grades/calculate-gpa.html"
  ],
  "related": [
    "grade",
    "weighted-grade",
    "final-grade"
  ],
  "changelog": []
}
