A worked example
Take four courses: an A (4.0) in a 3-credit class, a B+ (3.3) in a 4-credit class, a B (3.0) in a 3-credit class, and an A- (3.7) in a 2-credit class. Total grade points: (4.0×3) + (3.3×4) + (3.0×3) + (3.7×2) = 12 + 13.2 + 9 + 7.4 = 41.6. Total credits: 3+4+3+2 = 12. GPA = 41.6 ÷ 12 = 3.467 — not simply the average of 4.0, 3.3, 3.0, and 3.7 (which would be 3.5), because the credit weighting shifts the result slightly.