Your GPA is a weighted average: each course counts in proportion to its credit hours. That means the fastest way to move a GPA is not acing more classes — it is acing more credit-heavy classes. A 4-credit A pulls your average four times as hard as a 1-credit seminar.
Grade replacement math matters too. If your school replaces old grades, retaking a failed 3-credit course moves your GPA twice: removing the F and adding the new grade. Model both effects in the GPA calculator by adding the course twice and comparing.
Finally, protect yourself with the grade calculator: enter your current average, the weight of the final, and your target grade to see exactly what score you need on the exam. Removing end-of-semester surprises is half the battle.