This spreadsheet calculates gas compressibility factor based on Brill Beggs correlation. This method uses the general mechanical energy balance and the average in-situ density to calculate the pressure gradient. The Brill beggs method works for horizontal or vertical flow and everything in between. It also takes into account the different horizontal flow regimes.
Instruction To Use Brill Beggs Spreadsheet: