You can find the calculation formula on Wikipedia in the "Calculating the ELO rating" section.
Baratorch indicated in the first post what the K coefficient depends on for this formula.
We substitute the K coefficient, the players' ratings, and the match result, and we get the rating change.
You can see an example of the calculations in the screenshot.