Method Deck / other

Credit-weighted GPA

Computes a credit-weighted grade point average from a list of letter grades and their credit hours on the standard 4.0 scale.

Published for review. The Founder is checking every card himself; anything he strikes comes down the same hour.

Try it

Inputs

Outputs

Steps

  1. Convert each letter grade to grade points using the standard 4.0-scale table: 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=0.0.
  2. Multiply each course's grade points by its credit hours and sum the results.
  3. Divide by the sum of all credit hours.
  4. Round to 2 decimals.

Constants

Sources

Worked example and test vectors

NameInputsAnswer
worked example{"grades":["A","B+","B"],"credits":[3,4,3]}3.42
test vector: mixed grades{"grades":["A-","C","B-"],"credits":[3,3,3]}2.80

Published card