I’ve noticed that in tournaments grandmasters are given a performance rating for how they played in that tournament. Can this be applied to individual games and how can I see mine when I play a game?
Under FIDE rules, the performance rating is calculated by taking the average of your opponent's ratings, and then adding a factor from a table based on performance. Let's say you played 5 games, against people rated 1380, 1390, 1400, 1430, and 1900, and had 3 wins and 2 losses. You scored 60%, or 0.6. According to the table in section 1.49 of this document, in this case your performance rating would be adjusted upward by 72 points. The average of your opponent's ratings was 1500, so your performance rating would be calculated as 1572.
The downside to this method is that the ratings averaging can be skewed by one opponent with a very high or low rating. If you changed the 1900 opponent in the above example to a 2900 opponent and decreased the wins to 2, the performance rating would increase to 1628, even though you performed worse. If you instead changed the 1900 opponent to a 1000 opponent and increased the wins to 4, the performance rating would go down to 1560, even though you performed better.
The USCF ratings estimator calculates performance rating by calculating how a player at a particular rating would be expected to do against the given opponents, and comparing it to the actual result. In the example above, a player rated 1563 would be expected to score 3 based on those opponents, so that's the performance rating.
The downside to this method is that there's not just a simple formula you can figure out in a few seconds. The upside is that it's less prone to being skewed by one very high or low rated opponent.
Performance rating doesn't make sense for a single game, it only makes sense if you play a bunch of games (at least 4 or 5) in a chess event. For example, in a round robin tournament with 4 players, where every player plays twice against every opponent (with White and Black), every player plays 6 games in total, and the performance rating will give useful information.
To compute your performance rating, for every game of the event you add the opponent's rating + 400 if you win, you add your opponent's rating if you draw, and your opponent's rating - 400 if you lose. Then you divide by the number of games you played.
You can compare the performance rating with your own rating. If the performance rating of the event is higher than your own rating, it usually means you performed better than expected during the event. If it is lower than your rating, you performed worst than expected.
This is only meaningful if the opponents and you have a relatively close rating. If some player's rating differ from your own more than 400 points, the results of the comparison are usually not so meaningful.