Quick Answer
It depends on your school's policy - some replace the old grade entirely, while others average both attempts into your GPA.
Grade Replacement Policies Vary
Some schools operate a full grade-replacement policy, where only your most recent grade counts toward GPA. Others average both attempts, or keep both grades on your transcript but only count the better one. Always confirm your specific school's policy with your registrar before assuming a retake will fully erase the earlier grade's impact.