Chess rating calculating algorithm In competitive chess tournaments,  there is a complex rating system that evaluates your rating based on how you do well you do playing games. I am referring to the FIDE system not USCF. Are there FIDE chess players who know for the function of evaluating rating and understand it to the excess of being able to explain it thoroughly to me? Thank you very much. If your curious, I'm FIDE 1760.
 A: $$\mathrm{new} \; \mathrm{rating} = \mathrm{old} \; \mathrm{rating} + K\cdot(\mathrm{score} - \mathrm{expected} \; \mathrm{score}) $$

Here $K$ is the $K$-factor, which is the weight of the game. This is determined as following:


*

*It is 40 if the number of played games is smaller than 30.

*It is 20 if the number of played games is greater than 30 and the rating is less than 2400.

*It is 10 if the number of played games is greater than 30 and the rating is more than 2400.

*It is 40 if rating is less than 2300 and the age of the player is less tan 18. 



The score is 1 if you've won, 0.5 if it is a draw, and 0 if it is a loss. Any game with more than one move by each player counts as a game. This applies only for games that have at least:


*

*60 minutes

*90 minutes if the rating of one of the players is greater than 1600

*120 minutes if the rating of one of the players is greater than 2200.


Time per player. For example, rapid chess games do not count. 

The expected score is determined using a normal distribution with $\sigma=200\sqrt{2}$. This means that if the rating difference determines the expected score. The difference can be found in the Handbook of Chess, FIDE Rating Regulations, article 8.1b.
The FIDE rating is always rounded to the nearest integer. Note that if the loss is say 7.5, it counts as a loss of 8. 

Example. You are 14 years old and your FIDE rating is 1760 (form your profile). Therefore your K-factor is 40. 
You play one game against someone with FIDE rating 1900. The difference in ratings was 140.  It is a draw. Your score is 0.5. Your expected score was 0.31. (see article 8.1b in the link). Therefore 
$$\mathrm{new} \; \mathrm{rating} = 1760 + 40\cdot(0.5 - 0.31) = 1768$$
A: Formula
The basic formula goes as following:
$$R_{\text{new}} = R_{\text{old}} + K \cdot (W - W_e) $$


*

*$R_{\text{new}}$ = The new rating

*$R_{\text{old}}$ = The old rating

*$K$ = The K-factor

*$W$ = The score, for example: if you score 6.5 out of 9.0, your score is 6.5

*$W_e$ = The expected score


$$$$
The K-Factor
This is one of the most important aspects of the formula. This is the development coefficient. It determines the factor which is multiplied with the $(W-W_e)$. The bigger the K-factor, the bigger the impact is for wins or loses. For example, let's assume that $K = 10$, and the $(W-W_e) = 0.7$. This means your rating will be increased with $K \cdot (W- W_e) = 7$. If your K-factor is higher, you will gain more rating points.
The K-factor is determined by your rating and your age. The FIDE uses the following ranges:

*

*$K = 40$, this is used for new players (less than 30 games played in total) and players under the age of 18, as long as their rating remains under 2300.

*$K = 20$, this is used for players with a rating under 2400

*$K = 10$, this is used for players with a rating of at least 2400 and have played at least 30 games in previous events. After this, the K-factor permanently remains at 10.

$$$$
The expected score
This is determined by the rating of your opponent and the following table:

It shows two things:

*

*$p$ = the fractional score

*$dp$ = rating difference

For example, you have a FIDE-rating of 1760. If you win from a 1950-player, the $W_e$ can be determined from the table of conversion here above.
The $dp = 1950 - 1760 = 190$, you can see in the table that the $dp$ of 190 lays between the $.75$ and the $.74$. When the $dp$ is positive, the $p$ will be rounded up (ceiling function), while if the $dp$ is negative, this will be rounded down (floor function). The $dp = 190$, so the $p = .75$. Adding all the fractional scores of each game will give you the expected score ($W_e$).
$$$$
Example
Let's say there is a tournament with 5 games. You have a 1760 rating. The five other opponents have the following ratings:

*

*$R_1 = 1660$, the expected score = .64

*$R_2 = 1910$, the expected score = .29

*$R_3 = 1835$, the expected score = .39

*$R_4 = 1885$, the expected score = .33

*$R_5 = 1960$, the expected score = .24

The $W_e = 0.64 + 0.29 + 0.39 + 0.33 + 0.24 = 1.89$
This was your expected score. Let's say you got a score of 3.0 out of 5.0, the $W = 3$. Your rating is lower than $2400$ ( assuming that you're older than 18 and played more than 30 FIDE-rated games in total), so the K-factor = $20$. Your old rating was $1760$. Now we have all the variables to calculate your new rating:
$$R_{\text{new}} = 1760 + 20 \cdot (3 - 1.89) = 1782.2$$
So your new rating would be 1782.
