QB Ratings and How to Calculate Them
In American football, we have a player called the quarterback (QB), the most important position in football. He is the one who directs the offense. We always see a decimal number associated with the QB, but what is that number? There are only two numbers that have decimals and they are completion percentage and QB passer rating. It is easy to calculate completion percentage by dividing a completed pass over the number of attempts. But how do you calculate the QB rating? It is a little more difficult.

In the image above, you see the equation to calculate the passer rating of the QB in the NFL. (The Canadian Football League uses the same formula as well.) “Comp” is completed passes, “att” is pass attempts, “yds” is yards passed, “ints” is interceptions thrown, and “td” is passing touchdowns. When it comes to QB statistics, we look at his attempted passes, completed passes, touchdowns thrown, interceptions thrown (passes caught by opposing defense), and yards passing. Here is a link to the Wikipedia article to get more information https://en.wikipedia.org/wiki/Passer_rating. Now let’s test the formula.

First, let’s pick a QB and a season in which he played. I will choose Steve Young and his 1994 campaign. His 1994 season is considered to be one of the greatest passing seasons in NFL history as he broke his predecessor's single season 1989 passer rating of 112.4 with 112.8 and the fact that the 49ers offense was very potent. Now, let’s see if the program can produce the same number. By consulting the pro football websites, he completed 324 passes on 461 attempts, threw for 3969 yards, and 35 touchdowns against 10 interceptions.

As you can see, I did get 112.8. So the program works.
However, I should provide a word of caution. The QB passer rating is a statistical look at the QB’s performance in a game, or season, or entire career. What is important to know is that statistics never tell the entire story so to better understand the context, look at the opponent and whether the game is a regular season game or the Super Bowl. If a QB put up say 109.3 against a terrible defense, we should not be surprised he did well. But if he put up the same rating against an elite defense in a playoff game, that is more impressive. However, it does give us some insight regarding how the QB did in the game if we did not watch that game.
So this is the way to calculate the QB passer rating. It is an easy program to write to do that for us.