Read the chart I gave you in the other thread. Win against a stronger player will pay better than win against a weaker player. Lose to a weak player and it'll cost you more points.
The numbers are calculated when the game finishes. If you're using Firefox or Chrome there's a BigDogg script which shows you the expected results in each active game, based on the ratings at the time you're looking at the screen. This can change during the game so you need to check it when the game ends.
The formula is Your New Rating = Your Rating at End of Game + K(Result) - K/{10^[(Opponent's Rating at End of Game - Your Rating at End of Game)/400]+1}.
Note: Result is 1 if you win, 0.5 if you draw and 0 if you lose.
Note: K is 32 if your rating is between 0 and 2099 (inclusive), 24 if your rating is between 2100 and 2399 (inclusive), and 16 if your rating is 2400 and above.
Note: If your opponent has played less than 20 games (i.e. between 0 and 19 games (inclusive)), then K is 16 if your rating is between 0 and 2099 (inclusive), 12 if your rating is between 2100 and 2399 (inclusive), and 8 if your rating is 2400 and above.
Note: If your opponent has played less than 5 games (i.e. between 0 and 4 games (inclusive)), then Opponent's Rating at End of Game is treated as 1200 for the purpose of this formula.