I don’t know any certain formula, because usually you enter your scores into a computer and it does it for you. However if you just want an estimate then it’s just an average of how many over par you shoot on 18 holes (72 is usually par). If you consistently shoot 90, 91, 92, then your handicap would be 19. If you consistently shoot 75 on 18 holes, then your handicap would be a 3.