ExpectedScore=1/(1+10^((R_opponent-R_player)/400))
R_new=R_old+K*(Sum(Score)-Sum(ExpectedScore))

Player's old rating:

Opponent's Rating Score Expected Score
Sum

K-value (16=Master, 32=Beginner)

Player's new rating: