STUDY OF THE AMMONIA SYNTHESIS EQUILIBRIUM BY SPREADSHEET
Introduction: Microsoft Excel, like other spreadsheet programs, is a powerful software tool for doing extensive chemical calculations without having to know a programming language like C, Fortran, Basic, or Pascal. Results of calculations can be organized and visualized in a readily understandable tabular format. In this computational exercise we will use Excel to perform calculations related to the ammonia synthesis reaction used for the industrial production of ammonia by the Haber Process. The reaction to be considered is the ammonia gas phase formation reaction:
N2(g) + 3 H2(g) <----> 2 NH3(g)
with an equilibrium constant Kp = 977 at 25° C.
The reaction quotient Qp is written in terms of the partial pressures of the species as follows:
(under arbitrary conditions).
The value of Qp is an indicator of whether equilibrium has been attained for the reaction. For any arbitrary mixture not at equilibrium Qp is not equal to Kp. However, as time proceeds, the reaction will take place in a direction which causes Qp to tend toward the value of Kp until, at equilibrium:
Q
p = KpFor this reason it is usually written that:
(under equilibrium conditions).
Part One: Calculation without a Spreadsheet:
Calculating reactant and product concentrations from the Kp given the initial conditions is an important application of the equilibrium constant. This may be done without the use of sophisticated spreadsheet technique in a manner such as what you have learned in lecture. Your pre-lab instructor will review this procedure for you. Take good notes.Part Two: Using the Spreadsheet
: In general the problem is much more complicated in cases with other initial conditions. These problems can be solved by brute force using Excel. Though there are even more efficient ways, this will be yet another example of the power of spreadsheet analysis.1. Log into your account on the PC and launch MicroSoft Excel.
2. Label the columns of your spreadsheet by typing headings into Row 1, from left to right: N2, H2, NH3, x, Qp, and Kp. These will be the partial pressures of the three species in bar units, the value of x in bar units, the value of the pressure quotient Qp and the equilibrium constant Kp, respectively.
N2 |
H2 |
NH3 |
x |
Qp |
Kp |
3. In Row 2, input the initial values of these various quantities:
For the N2, H2, and NH3 columns, enter initial pressures 1.0, 3.0, and 0 in cells A2, B2, and C2. For the initial value of x, enter 0 in cell D2. The value of K in cell F2 as 977.
1 |
3 |
0 |
0 |
977 |
Enter the formula that will always be used to evaluate the pressure quotient Qp at any point during the approach to equilibrium. Click on cell E2 and type in the formula for Qp by starting with an "=" sign; type:
1 |
3 |
0 |
0 |
=C2^2/(A2*B2^3) |
977 |
As soon as you hit the Carriage Return, the result of the formula should appear in cell E2. As expected, the initial value of Q = 0.
4.Now we want values of x to go from 0 to near 1 in small increments of pressure such 0.05 bar, in order to calculate the various pressures and Qp values as equilibrium is approached. To accomplish this select cell D3 and type:
=D2 + 0.05
This will cause x to change by 0.05 increments as one goes down the table from one row to the next.
5. Now we want x to continue increasing by 0.05 increments as we go down the table. Select cell D3, choose Copy from the Edit menu, then holding the mouse button down, drag the mouse from cell D3 all the way down the x column to row 22. Now release the mouse button and go to the Edit menu and click on Paste. This will paste the formula that was in cell D3 into all remaining cells in the x column, and thus increment x values by 0.05 as one goes down the table up to a maximum value of 1.00. The formula in cell D3 copied into every cell in the x column is a relative formula. In other words:
Row 3 =D2+0.05
Row 4 =D3+0.05
Row 5 =D4+0.05
. .
The values in column x control the calculation as it proceeds down the table towards equilibrium. Every other column will depend on the value of x. In fact, the reaction goes past equilibrium, since we know beforehand that x=0.895 is the equilibrium value of x and we have made x proceed to a maximum value of 1.00.
6. Now connect the values in the other column to the changing value of x in column D.
The N2 pressure should = (initial N2 pressure - x) at every increment of x, in other words, in every row. This is the term (1.0-x) in our formula for Q. To make this so, select cell A3 and type in the formula:
= A$2 - D3
The symbol A$2 here stands for the value of the fixed cell A2, the fixed initial value given for the N2 pressure. Now select cell A3 and copy the formula in that cell down through Row 22. Therefore, the formulas in column A will be given by
Row 3 =A$2 - D3
Row 4 =A$2 - D4
Row 5 =A$2 - D5
. .
The H2 pressure and the NH3 pressure can be constructed likewise in columns B and C respectively.
In cell B3, enter the formula for the decrease in the H2 pressure as x increases:
= B$2 - 3*D3
Note: this stands for (3.0 - 3x) in the formula.In cell C3, enter the formula for the increase in the NH3 pressure as x changes:
= C$2 + 2*D3
Note: this stands for (2x) in the formula.Now copy cell B3 and C3 down to Row 22 in their respective columns.
7. Finally, copy the formula for the pressure quotient Qp located in cell E2 down its column in the usual fashion. Also, copy the constant value of the equilibrium constant Kp down its column by setting cell F3 = F$2 and then copying F3 and pasting it down the whole F column.
Here is how the first few rows of your spreadsheet should look after you have done these tasks:

Analysis: Once you have accomplished all of these manipulations, you are ready to interpret your spreadsheet. Essentially what we have is the value of the pressure quotient Qp as a function of the pressures of the three species, which are in turn changing as x changes. As x grows larger, the reaction proceeds towards the right and towards equilibrium. N2 and H2 decrease from their starting value, H2 decreasing three times as fast because of stoichiometry. NH3 pressure increases at double the rate that N2 decreases. Qp increases to a value of 1200 when x=0.90, which is actually past the equilibrium position slightly. The x value that gives the Qp value closest to K is the solution and represents the state in which equilibrium has been reached, since Q K. In this example equilibrium is somewhere in between two states, as shown from the excerpt of the spreadsheet below:
![]()
![]()
Interpolating we see read off the approximate equilibrium pressures
N2, between 0.1 and 0.15 bar
H2 , between 0.3 and 0.45 bar
NH3 , between 1.7 and 1.8 bar
Using a smaller increment of x than 0.05 we could obtain more precise values.
Notice that below x=0.9 row, the value of Qp begins to radically exceed the value of K, and we are well past the equilibrium position of the reaction.