Credit-weighted mean
Every grade becomes points on the chosen scale, and each course contributes points times credit hours to a running total. The GPA is the sum of those weighted points divided by the sum of all credit hours. That is why the arithmetic average of the letter grades almost never matches the reported GPA, and why a low grade in a high-credit course hurts far more than the same grade in a low-credit one.