A golfer's handicap index is calculated by a formula that takes into account their scores of the previous rounds. The formula considers the golfer's adjusted total score, the difficulty of course, and also the course rating to arrive at the handicap index.