By Saad Iqbal
A kick is already flowing into the wellbore, and the choke operator is watching the casing pressure climb. Every psi matters, because somewhere past a number nobody wrote down clearly enough, the pressure in the annulus will exceed what the weakest point in the wellbore — almost always the casing shoe — can handle. Cross that line and you are circulating a kick into a fracture instead of safely out through the choke.
That ceiling number is MAASP, the Maximum Allowable Annular Surface Pressure, and it should never be a figure you have to go dig for mid-kill. This guide walks through a full MAASP calculation by hand, with the governing equations and a worked numeric example, then shows how to automate it in Python so the number is already sitting on a dashboard before you ever need it.
What You Need Before You Start
- True vertical depth (TVD) of the last casing shoe, in feet
- The most recent Leak-Off Test (LOT) or Formation Integrity Test (FIT) result, and the mud weight in the hole when it was run
- Current mud weight in the well, in ppg
- A kill sheet or well control software reference to sanity-check your number against
- Decimal precision carried through every step — round only at the final answer, not along the way
Step 1: Confirm the Casing Shoe TVD and Well Geometry
MAASP is always referenced to the shoe of the last cemented casing string, because that is normally the shallowest point exposed to annulus pressure and therefore the weakest link in the system. On a well with multiple casing strings, pull the TVD for the deepest shoe currently open to the annulus you are protecting, not an earlier intermediate shoe left over from a previous program revision — using the wrong shoe is one of the most common errors in this calculation (see Common Pitfalls below).
Worked example: the well in this guide has its last casing shoe set at a TVD of 7,000 ft. That single number, TVDshoe = 7,000 ft, is the reference depth for every equation that follows.

Step 2: Pull the LOT or FIT Result — and Know Which One You Have
A Leak-Off Test (LOT) pumps past the formation’s initial breakdown to find a true fracture pressure, giving you a real data point for the rock’s strength at the shoe. A Formation Integrity Test (FIT) only confirms the formation can hold a target pressure without ever breaking it down — it proves integrity up to that number, but it does not tell you where the rock actually fails. Treating a FIT result as if it were a LOT overstates your true margin and is a dangerous assumption to carry into a kill sheet.
Worked example: the LOT on this well was run with 9.0 ppg mud in the hole. Surface pressure at leak-off was 1,800 psi. So: MWtest = 9.0 ppg, PLOT = 1,800 psi.

Step 3: Convert the LOT Result to a Maximum Equivalent Mud Weight (EMW)
The LOT pressure tells you how much extra pressure the shoe could take on top of the mud weight that was in the hole during the test. Converting that into an equivalent mud weight gives you a single number — the heaviest mud the formation can tolerate before it fractures — that you can compare directly against any future mud weight.
MW_max = MW_test + [ P_LOT / (0.052 x TVD_shoe) ]
where:
MW_max = maximum equivalent mud weight the shoe can hold, ppg
MW_test = mud weight in hole during the LOT, ppg
P_LOT = surface pressure at leak-off, psi
TVD_shoe = true vertical depth of the casing shoe, ft
0.052 = hydrostatic gradient constant, psi/ft per ppg (US oilfield units)
Worked example: MWmax = 9.0 + [1,800 / (0.052 × 7,000)] = 9.0 + 4.945 = 13.95 ppg EMW. That is the ceiling — the equivalent mud weight the shoe can take before the formation starts to fracture.

Step 4: Calculate MAASP at Your Current Mud Weight
MAASP translates the margin between the maximum EMW and whatever mud weight is actually in the well right now into a surface pressure value you can read directly off a gauge.
MAASP = (MW_max - MW_current) x 0.052 x TVD_shoe
where:
MAASP = Maximum Allowable Annular Surface Pressure, psi
MW_max = maximum equivalent mud weight from Step 3, ppg
MW_current = mud weight currently in the well, ppg
TVD_shoe = true vertical depth of the casing shoe, ft
Worked example: with a current mud weight of 9.5 ppg: MAASP = (13.95 − 9.5) × 0.052 × 7,000 = 4.45 × 0.052 × 7,000 = 1,620 psi. That is the highest annulus surface pressure this well can tolerate right now without breaking down the shoe.

Step 5: Automate the Calculation in Python
Once the two equations are confirmed by hand, wrap them in a short Python function so the number recalculates automatically every time the mud weight changes, instead of relying on someone redoing arithmetic on a kill sheet under pressure.
def maasp(tvd_shoe_ft, mw_test_ppg, p_lot_psi, mw_current_ppg):
"""
Calculate Maximum Allowable Annular Surface Pressure (MAASP).
tvd_shoe_ft : TVD of the casing shoe, ft
mw_test_ppg : mud weight in hole during the LOT/FIT, ppg
p_lot_psi : surface pressure at leak-off, psi
mw_current_ppg : current mud weight in the well, ppg
"""
GRADIENT = 0.052 # psi/ft per ppg, US oilfield units
# Step 3: convert the LOT result to a maximum equivalent mud weight
mw_max_ppg = mw_test_ppg + (p_lot_psi / (GRADIENT * tvd_shoe_ft))
# Step 4: MAASP at the current mud weight
maasp_psi = (mw_max_ppg - mw_current_ppg) * GRADIENT * tvd_shoe_ft
return round(mw_max_ppg, 2), round(maasp_psi, 0)
# Worked example from Steps 1-4
mw_max, maasp_psi = maasp(
tvd_shoe_ft=7000,
mw_test_ppg=9.0,
p_lot_psi=1800,
mw_current_ppg=9.5,
)
print(f"Max EMW: {mw_max} ppg | MAASP: {maasp_psi} psi")
# Max EMW: 13.95 ppg | MAASP: 1620.0 psi
# Sensitivity table: how MAASP shrinks as mud weight climbs
for mw in [9.5, 10.0, 10.5, 11.0]:
_, m = maasp(7000, 9.0, 1800, mw)
print(f"Current MW {mw} ppg -> MAASP {m} psi")
Running this in a Jupyter notebook with pandas lets you log every mud weight change and the matching MAASP value over the life of the well, instead of relying on a static number from the morning report.

Step 6: Set Alarm Thresholds and Pipe the Number to a Dashboard
MAASP itself should not be the alarm point — by the time a gauge reads the full MAASP value, you are already at the edge. Set a working alarm at 90–95% of the calculated MAASP so the crew reacts with margin still in hand. Feed the live value, recalculated from Step 5’s function every time mud weight is logged, into a rig floor display using something like Power BI or Looker Studio, so MAASP is visible continuously rather than looked up only when a kick is already in progress.
Expected Result
For this well — TVDshoe = 7,000 ft, LOT of 1,800 psi at 9.0 ppg, current mud weight 9.5 ppg — MAASP comes out to 1,620 psi. Run the same well at a heavier 10.5 ppg mud weight and MAASP drops to roughly 1,256 psi. That difference shows the real cost of weighting up: every additional 1.0 ppg of mud weight eats about 364 psi of margin on this well (0.052 × 7,000 ft), so MAASP should be recalculated every time the mud program changes, not just once at the start of the well.
How to Verify Your MAASP Number
- Recompute the same inputs by hand or against your kill sheet reference and confirm both answers land within a few psi of each other — a large mismatch usually means a TVD or unit entry error, not a bad formula.
- Check that MAASP moves linearly with mud weight: it should fall by roughly 0.052 × TVDshoe psi for every 1.0 ppg increase in current mud weight. If your number does not track that relationship, re-check the inputs before trusting it.
Common Pitfalls
- Using the wrong shoe on a multi-string well. MAASP is referenced to the last casing shoe exposed to the annulus you are protecting — an outdated intermediate shoe TVD will give you a confidently wrong ceiling.
- Confusing a FIT with a LOT. A FIT only proves the formation held to a target pressure; it does not establish the true fracture point the way a LOT does, so plugging a FIT value into the EMW equation overstates your margin.
- Forgetting to recalculate after a mud weight change. MAASP is not a fixed number for the life of the well — it shrinks every time mud weight goes up, and the Python function above exists precisely so that update never gets skipped.
MAASP sits alongside two other shoe-strength calculations worth having automated before you need them under pressure: see our walkthrough of fracture gradient calculation using Eaton’s method, our guide to automating ECD calculations in Python, and our comparison of geomechanics software for wellbore stability if you want to take the shoe-strength math further.
