{
  "id": "grade",
  "version": "8aa14282d6f2",
  "status": "published",
  "name": "Grade Calculator",
  "question": "What is my class grade?",
  "summary": "Computes a course grade as the weighted average of graded work, its letter grade, and the grade needed on the work still to come to reach a target.",
  "category": "education",
  "subcategory": "grades",
  "url": "https://www.acalculator.org/education/grade-calculator",
  "markdown": "https://www.acalculator.org/education/grade-calculator.md",
  "kind": "function",
  "method": "grade = Σ(grade × weight) ÷ Σ(weight) over the graded rows; needed = (target × (graded weight + remaining weight) − Σ(grade × weight)) ÷ remaining weight.",
  "assumptions": [
    "Weights are relative: percents of the course or points possible give the same average, and they do not need to add up to 100.",
    "A row with a weight and no grade is work not graded yet; its weight is the weight still to come.",
    "Letter grades follow the Tompkins Cortland Community College (SUNY) scale: A 93 and up, A- 90 to below 93, B+ 87, B 83, B- 80, C+ 77, C 73, C- 70, D+ 67, D 63, D- 60, F below 60.",
    "Grades above 100% (extra credit) are allowed and count as an A."
  ],
  "inputs": {
    "$schema": "https://json-schema.org/draft/2020-12/schema",
    "type": "object",
    "properties": {
      "grade1": {
        "title": "Grade 1",
        "description": "The grade on assignment or category 1, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight1": {
        "title": "Weight 1",
        "description": "How much assignment or category 1 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "grade2": {
        "title": "Grade 2",
        "description": "The grade on assignment or category 2, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight2": {
        "title": "Weight 2",
        "description": "How much assignment or category 2 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "grade3": {
        "title": "Grade 3",
        "description": "The grade on assignment or category 3, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight3": {
        "title": "Weight 3",
        "description": "How much assignment or category 3 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "grade4": {
        "title": "Grade 4",
        "description": "The grade on assignment or category 4, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight4": {
        "title": "Weight 4",
        "description": "How much assignment or category 4 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "grade5": {
        "title": "Grade 5",
        "description": "The grade on assignment or category 5, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight5": {
        "title": "Weight 5",
        "description": "How much assignment or category 5 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "grade6": {
        "title": "Grade 6",
        "description": "The grade on assignment or category 6, in percent. Leave it empty for work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      },
      "weight6": {
        "title": "Weight 6",
        "description": "How much assignment or category 6 counts: a percent of the course, or its points possible.",
        "type": "number",
        "minimum": 0.01,
        "maximum": 100000
      },
      "target": {
        "title": "Grade you want",
        "description": "The course grade you want, in percent, to find the grade needed on the work not graded yet.",
        "type": "number",
        "x-unit": "percent",
        "minimum": 0,
        "maximum": 200
      }
    }
  },
  "outputs": {
    "grade": {
      "label": "Your grade so far",
      "description": "The weighted average of the graded rows: the sum of grade × weight divided by the sum of weights.",
      "format": "percent"
    },
    "letter": {
      "label": "Letter grade",
      "description": "The letter for the grade so far on the Tompkins Cortland Community College scale.",
      "format": "text"
    },
    "needed": {
      "label": "Grade needed on the rest",
      "description": "The average grade needed on the rows with a weight and no grade to finish the course at the grade you want.",
      "format": "percent"
    },
    "note": {
      "label": "Note",
      "description": "Whether the grade needed is above 100% or already secured.",
      "format": "text"
    },
    "graded": {
      "label": "Weight graded",
      "description": "The sum of the weights of the rows with a grade.",
      "format": "number"
    },
    "remaining": {
      "label": "Weight still to come",
      "description": "The sum of the weights of the rows with no grade yet.",
      "format": "number"
    }
  },
  "defaultAnswer": {
    "inputs": {
      "grade1": 92,
      "weight1": 20,
      "grade2": 85,
      "weight2": 20,
      "grade3": 78,
      "weight3": 25,
      "weight4": 35,
      "target": 85
    },
    "outputs": {
      "grade": 84.46153846153847,
      "letter": "B",
      "needed": 86,
      "graded": 65,
      "remaining": 35
    },
    "text": "Your grade so far is 84.46% (B)."
  },
  "examples": [
    {
      "given": {
        "grade1": 92,
        "weight1": 20,
        "grade2": 85,
        "weight2": 20,
        "grade3": 78,
        "weight3": 25,
        "weight4": 35,
        "target": 85
      },
      "expect": {
        "grade": 84.46153846153847,
        "letter": "B",
        "needed": 86,
        "graded": 65,
        "remaining": 35
      },
      "source": "hand calculation in content.mdx: 5,490 ÷ 65 = 84.46%; (85 × 100 − 5,490) ÷ 35 = 86%"
    },
    {
      "given": {
        "grade1": 90,
        "weight1": 50,
        "grade2": 72,
        "weight2": 100
      },
      "expect": {
        "grade": 78,
        "letter": "C+",
        "graded": 150
      },
      "source": "hand calculation in content.mdx: (90 × 50 + 72 × 100) ÷ 150 = 78%"
    },
    {
      "given": {
        "grade1": 70,
        "weight1": 60,
        "weight2": 40,
        "target": 90
      },
      "expect": {
        "grade": 70,
        "letter": "C-",
        "needed": 120,
        "note": "Above 100%: the grade you want needs extra credit.",
        "remaining": 40
      },
      "source": "hand calculation in content.mdx: (90 × 100 − 70 × 60) ÷ 40 = 120%"
    },
    {
      "given": {
        "grade1": 96,
        "weight1": 80,
        "weight2": 20,
        "target": 70
      },
      "expect": {
        "grade": 96,
        "letter": "A",
        "needed": -34,
        "note": "Already secured: even 0% on the rest keeps the grade you want."
      },
      "source": "hand calculation in content.mdx: (70 × 100 − 96 × 80) ÷ 20 = −34%"
    },
    {
      "given": {
        "grade1": 92.99,
        "weight1": 1
      },
      "expect": {
        "grade": 92.99,
        "letter": "A-"
      },
      "source": "Tompkins Cortland Community College grading scale: A is 93 to 100, A- is 90 to 92"
    }
  ],
  "sources": [
    "Tompkins Cortland Community College (SUNY), Grading System: grading scale for converting between numerical and letter grades (A 93–100 through F 59 and below). https://www.tompkinscortland.edu/sites/default/files/documents/CollegeNow%20Grading%20Scale.pdf"
  ],
  "related": [
    "weighted-grade",
    "final-grade",
    "gpa",
    "test-grade"
  ],
  "changelog": []
}
