Plumbing Formulas for Excel
All 35 formulas from the plumbing formula reference, rewritten as Microsoft Excel formulas you can paste straight into a cell. Each one comes with the input cells it expects, a named-range version that reads like English, and the answer it returns for a worked example. The IPC lookup tables are here too, ready to paste.
Every constant below is pulled from the same code that runs our calculators, so a formula you paste into a sheet returns the number the calculator returns. 27 of the 35 are a single expression; the other 8 need one of the tables pasted in, because the IPC is a book of tables and no amount of algebra changes that.
Set up your sheet first
Every formula on this page assumes the same simple layout: labels down column A, values down column B starting at row 2, and the answer in column E. Build that once and you can paste any formula here without editing a cell reference.
| Cell | Holds | Example |
|---|---|---|
| A2 | The input's name | Flow |
| B2 | The first input value | 10 |
| B3, B4 … | Further inputs, in the order listed on each card | 0.785 |
| E2 | The formula, and any second formula in E3 | =0.4085*B2/B3^2 |
| F, G, H … | Any pasted lookup table | Table 909.1 |
For the named-range versions, in Excel: select A2:B6, then Formulas →
Create from Selection → Left column. Excel turns each label in column A into a name for the
value beside it, and =0.4085*Flow/Bore^2
starts working. Named ranges are worth the two minutes on any sheet somebody else will have to
read. Google Sheets has no equivalent menu — names go in one at a time under
Data → Named ranges, which is slower but the same idea.
The supply side is where a spreadsheet earns its keep, because sizing a water line is genuinely iterative — you guess a size, check it against both the velocity cap and the friction budget, and go again. In a sheet you drop the size into one cell and read both answers at once.
Water Supply Fixture Units → Peak Demand (GPM)
Needs a table: Hunter's curveInput cells
- B2
- — Total WSFU · example 16.4
- F2:H38
- — Hunter's curve table (paste below) · example —
- B3
- — Helper — row index · example =MATCH(B2,$F$2:$F$38,1)
Paste into Excel
Named-range version
The example returns
18.16 gpm flush tank · 32.12 gpm flushometer valve
Hunter's curve is a table, not an equation, so this is the one formula on the page that cannot exist without pasting data in. The helper cell finds the bracketing row and the main formula interpolates between it and the next — which is what the calculator does. The leading IF is not decoration: past the last row (1000 fixture units) the interpolation would reach for a row that does not exist and return #REF!, so the curve is clamped there exactly as the calculator clamps it. Do not use VLOOKUP alone — it returns the row below and understates demand between anchors. Below the first anchor the calculator scales linearly from the origin instead, so counts under 1 fixture unit are outside what this formula covers.
Pipe Velocity
One formulaInput cells
- B2
- — Flow, gpm · example 10
- B3
- — Inside diameter, inches · example 0.785 (3/4 in Type L copper)
Paste into Excel
Named-range version
The example returns
6.63 ft/s
Bore, not nominal size — a nominal 3/4 in is 0.785 in in Type L copper and 0.681 in in PEX, and the square term makes that a 33% difference in velocity. Add a conditional format against 8 ft/s cold and 5 ft/s hot and the sheet flags its own violations. Those two limits are ASPE and tube-manufacturer practice, not IPC numbers.
Hazen-Williams Friction Loss
One formulaInput cells
- B2
- — Flow, gpm · example 10
- B3
- — Roughness coefficient C · example 140 (copper)
- B4
- — Inside diameter, inches · example 0.785
Paste into Excel
Named-range version
The example returns
11.08 psi per 100 ft
Returns psi per 100 ft. Excel's ^ operator is the same precedence as elsewhere, but the parentheses around the denominator are load-bearing — without them the d term multiplies instead of divides and the answer comes back absurdly small. Valid for water between 40 and 75 °F in turbulent flow only.
Available Pressure for Friction
One formulaInput cells
- B2
- — Static supply pressure, psi · example 60
- B3
- — Fixture minimum, psi · example 15
- B4
- — Height to highest fixture, ft · example 20
- B5
- — Meter loss, psi · example 8
- B6
- — Softener / filter / backflow losses, psi · example 0
Paste into Excel
Named-range version
The example returns
28.34 psi left for pipe friction
Whatever survives all four deductions is the entire budget for pipe friction. Measure the static pressure rather than assuming it, and measure it at night when mains pressure peaks. Every device someone adds later — a softener, a whole-house filter — comes straight out of this number.
Allowable Friction Loss per 100 ft
One formulaInput cells
- B2
- — Available pressure, psi · example 28.338
- B3
- — Developed length, ft · example 120
Paste into Excel
Named-range version
The example returns
23.62 psi per 100 ft allowable
Pair this with the Hazen-Williams cell above: the smallest pipe whose actual loss stays under this number is the answer. At 23.62 psi/100 ft, a nominal 1 in copper carrying 18 gpm loses 8.98 and passes, while 3/4 in loses far more and fails. Residential jobs usually land between 2 and 8.
Developed Length & Fitting Equivalents
Needs a table: Fitting L/D ratiosInput cells
- B2
- — Measured pipe run, ft · example 60
- B3
- — Inside diameter, inches · example 0.785
- F2:G9
- — Fitting table (paste below): L/D, then your count · example —
Paste into Excel
Named-range version
The example returns
80.1 ft developed from a 60 ft run with 6 elbows, 2 branch tees and a ball valve
Equivalent length is computed from the L/D ratio and the bore, not read off a per-size table — which is why one SUMPRODUCT covers every fitting and every pipe size at once. A 90° elbow on 3/4 in copper is only 1.96 ft, but a globe valve is 22.2 ft — more than the elbows put together.
The drainage side is where a spreadsheet is most likely to go quietly wrong, because most of it is code tables rather than arithmetic. Four of the eight below need a table pasted in. That is not a limitation of Excel — it is what the IPC actually is.
Drainage Fixture Units & Drain Size
Needs a table: Tables 709.1 and 710.1Input cells
- F2:G29
- — Fixture DFU table and your counts · example —
- B2
- — Total DFU · example =SUMPRODUCT($F$2:$F$29,$G$2:$G$29)
- B3
- — Water closet on this drain? · example TRUE
- J2:K6
- — Capacity table for the application · example —
Paste into Excel
Named-range version
The example returns
18 DFU with a water closet → 3" (the table alone says 2" — governed by the water closet, not the table)
The MAX wrapper is the part every spreadsheet on the internet leaves out. A two-bath house is 18 DFU, which the building-drain table carries on 2 in pipe — but a water closet floors a building drain at 3 in regardless. Note the floor applies to the building drain, not to a horizontal branch. Use the branch column for branches and the stack columns for stacks; a tall stack legitimately carries more than a short one.
Minimum Drain Slope
One formulaInput cells
- B2
- — Nominal pipe size, inches · example 3
Paste into Excel
Named-range version
The example returns
2 in → 0.25 in/ft · 3 in → 0.125 in/ft
Returns inches per foot. IPC 2021 has only two rows that matter in a house — 1/4 in/ft up to 2-1/2 in, 1/8 in/ft from 3 to 6 in — so the nested IF is honestly the whole table. Piping upstream of a grease interceptor stays at 1/4 in/ft whatever the size, which the formula does not know about; add that condition yourself if it applies.
Slope as Percent & Total Fall
One formulaInput cells
- B2
- — Slope, in/ft · example 0.125
- B3
- — Run, ft · example 40
Paste into Excel
Named-range version
The example returns
5.0 in of fall · 1.04%
The fall cell is the one that decides whether a run clears a footing or fits a joist bay. 1/4 in/ft is 2.08% and 1/8 in/ft is 1.04%. The same 40 ft run drops 10.0 in at 1/4 and 5.0 in at 1/8 — which is usually why a long run goes up a size.
Manning's Equation — Drain Capacity
One formulaInput cells
- B2
- — Inside diameter, inches · example 3
- B3
- — Slope, in/ft · example 0.125
- B4
- — Manning roughness n · example 0.01 (plastic)
Paste into Excel
Named-range version
The example returns
2.39 ft/s · 26.3 gpm
Two cells, because you want the velocity as well as the flow. B2/48 is the hydraulic radius of a half-full pipe in feet — diameter over 4, then inches to feet. The PI()/8 term is half of a full circle's area. Note the exponent needs its parentheses: ^(2/3) is a cube root of a square, while ^2/3 is a square divided by three, and Excel will not warn you. 448.831 converts cubic feet per second to gpm; it is the one constant here we carry rounded rather than as 60 × 7.48052, so that a sheet lands on exactly what the calculator prints. Watch the velocity cell rather than the gpm one: below about 2 ft/s solids drop out, which is why oversizing a drain at a flat grade can make it worse rather than better.
Vent Size
Needs a table: Stocked vent sizesInput cells
- B2
- — Drain size served, inches · example 3
- B3
- — Developed length of the vent, ft · example 30
- F2:F10
- — Stocked vent sizes (paste below) · example —
Paste into Excel
Named-range version
The example returns
3 in drain over 30 ft → 1-1/2" · the same drain over 60 ft → 2"
Half the drain diameter, floored at 1.25 in, rounded up to a size you can actually buy — then one size larger again past 40 ft of developed length. The 1.25 in floor only ever binds at 2 in drains and below; at 3 in and up the halving already clears it. The 40 ft rule upsizes the whole run, not just the excess, which is the part the MATCH offset is doing.
Trap Arm Maximum Length
Needs a table: Table 909.1Input cells
- B2
- — Trap arm size, inches · example 2
- F2:H6
- — Table 909.1 (paste below) · example —
Paste into Excel
Named-range version
The example returns
1-1/2 in → 6 ft · 2 in → 8 ft · 3 in → 12 ft
An exact MATCH, not an approximate one — a trap arm is a listed size, so a 0 as the third argument is correct here and a 1 would silently return the wrong row for an in-between value. There is a floor as well as a ceiling: the vent must also sit at least two pipe diameters downstream of the trap weir. Self-siphoning fixtures, water closets above all, are not length-limited at all.
Grease Interceptor Sizing
One formulaInput cells
- B2:B4
- — Sink L × W × D, inches · example 24 · 24 · 12
- B5
- — Compartments · example 3
- B6
- — Fill fraction · example 0.75
- B7
- — Drain period, minutes · example 1
- B8
- — Seats — gravity method below · example 100
- B9
- — Meal turnover per hour · example 1
- B10
- — Waste flow per meal, gal · example 6
- B11
- — Retention, hours · example 2.5
- B12
- — Storage factor · example 1
Paste into Excel
Named-range version
The example returns
89.77 gal → 67.32 gpm → a 75 gpm / 150 lb unit · 100 seats → 1,500 gal
Two devices, two units, and sizing one with the other's method gives a plausible number that means nothing. The hydromechanical trap is rated in gpm; the gravity interceptor is rated in gallons. PDI-G101 defines grease capacity as exactly 2 lb per gpm, so that cell is a definition rather than a lookup. The MAX against 1,000 gal matters more than the arithmetic — below roughly 65 seats the local FOG minimum governs and the calculation never binds.
Rainwater Yield & Cistern Storage
One formulaInput cells
- B2
- — Catchment area, ft² · example 2000
- B3
- — Rainfall over the period, inches · example 3.5
- B4
- — Runoff coefficient Cr · example 0.85
- B5
- — Collection efficiency Ce · example 0.85
- B6
- — First flush per ft², gal · example 0.015
- B7
- — Rain events in the period · example 4
- B8
- — Daily demand, gal · B9 dry-spell days · example 60 · 21
Paste into Excel
Named-range version
The example returns
4,364 gal gross − 120 gal first flush → 3,066 gal net · cistern governed by the dry spell at 1,260 gal
Four cells rather than one, because the first flush comes off the gross yield BEFORE the coefficients are applied — divert the dirtiest water first, then lose a share of what is left to the screen and the filter. Doing it in the other order, or skipping it, overstates the yield by 2.8% on this roof. Write the constant as 7.48052/12 rather than the 0.62 you will see quoted everywhere — it is one cubic foot of water spread an inch deep over a square foot, and letting Excel do the division keeps the full precision. Area is the horizontal projection of the roof, not its slope length, because rain falls vertically. The final MIN is the whole design: a tank bigger than the roof can refill just sits part empty.
Storm & Roof Runoff Flow
One formulaInput cells
- B2
- — Roof area, ft² · example 2000
- B3
- — Design rainfall, in/hr · example 4
- B4
- — Drain bore, inches · example 4.026 (4 in Sch 40)
- B5
- — Slope, in/ft · example 0.125
- B6
- — Manning roughness n · example 0.01
Paste into Excel
Named-range version
The example returns
83.1 gpm off the roof · a 4 in drain carries 115.3 gpm at 2.91 ft/s
Runoff is strictly linear in area and rainfall, so 41.56 gpm per 1,000 ft² at 4 in/hr scales exactly — the one place a per-square-foot rule of thumb is safe. The capacity line is the same Manning equation as the drain formula above but at FULL bore rather than half, which is why the area term is PI()/4 rather than PI()/8. This publishes the flow, not the code size: IPC Tables 1106.2 and 1106.3 govern leader and horizontal storm drain sizing and are deliberately not reproduced, the same call made for the vent-stack table.
Septic Tank & Leach Field
Needs a table: Tank minimums by bedroomInput cells
- B2
- — Bedrooms · example 3
- B3
- — Gallons per bedroom per day · example 150
- B4
- — Soil application rate, gal/ft²/day · example 0.8 (loam)
- B5
- — Trench width, ft · example 3
- F2:G6
- — Tank minimums table (paste below) · example —
Paste into Excel
Named-range version
The example returns
450 gpd → retention 900 gal vs minimum 1,000 gal → 1,000 gal tank, governed by the minimum · field 563 ft² = 188 ft of trench
The MAX is the whole tank calculation: on ordinary numbers the published minimum governs up to four bedrooms and retention only takes over at five, so a sheet that computes retention alone undersizes almost every house it is used on. The soil rate is the real variable — the identical house needs 375 ft² of field in sand and 1,875 ft² in slow clay, a 5x swing, while the tank does not move at all. Septic is not IPC territory: it falls to the IPSDC where adopted and to state and county health departments everywhere else, so treat every input here as a starting value and confirm the local ones. Setbacks, water table and a witnessed perc test are out of scope.
Grey Water Yield & Irrigable Area
One formulaInput cells
- B2
- — Occupants · example 3
- B3
- — Shower, gal/person/day · example 25
- B4
- — Lavatory, gal/person/day · example 5
- B5
- — Washer, gal/load · example 20
- B6
- — Washer loads per week · example 5
- B7
- — Irrigation demand, gal/ft²/week · example 0.6
Paste into Excel
Named-range version
The example returns
104.3 gpd (shower 75.0, lavatory 15.0, washer 14.3) · storage 104 gal · 1,217 ft² irrigable
The storage line looks pointless and is the most important one here: the hold is 24 hours, so maximum storage always equals exactly one day of yield. Untreated grey water goes septic past a day, so unlike a rainwater cistern it cannot bridge between events at all — it is a surge vessel, and the design work moves to the distribution field. The washer divides by 7 because it is per load per week while the others are per person per day; mixing those two bases is the easy error. Planting choice swings the area 4x, from 608 ft² of cool-season lawn to 2,433 ft² of drought-tolerant planting. Kitchen sink and dishwasher are deliberately absent — that is black water in most jurisdictions.
Everything here is closed-form, so this is the section that ports to a spreadsheet most cleanly. Two of them — thermal expansion and pressure-tank drawdown — carry a trap that catches most published spreadsheets: they are Boyle's law problems, so the pressures have to be absolute.
Pressure ↔ Head of Water
One formulaInput cells
- B2
- — Feet of head · example 150.1
- B3
- — …or psi · example 65
Paste into Excel
Named-range version
The example returns
65 psi = 150.1 ft of head
Write the second one as a division by 0.4331 rather than multiplying by 2.31. The reciprocal is 2.3089, so the rounded 2.31 introduces a small error that compounds once you feed it into a pump head total. Both constants shift slightly with water temperature — this is the one figure on the page that is a measurement rather than a definition.
Static Pressure Loss from Elevation
One formulaInput cells
- B2
- — Vertical rise, ft · example 25
Paste into Excel
Named-range version
The example returns
10.83 psi lost over a 25 ft rise
The only loss in a plumbing system that does not depend on flow — it is there whether anything is running or not. One storey costs about 4.33 psi. On a 45 psi supply, reaching a third floor spends roughly a fifth of the budget before a single foot of pipe friction.
Total Dynamic Head
One formulaInput cells
- B2
- — Static lift, ft · example 12
- B3
- — Friction loss, psi/100 ft · B4 length · example · 40
- B5
- — Discharge pressure required, psi · example 0
- B6
- — Velocity, ft/s · example 4.73
Paste into Excel
Named-range version
The example returns
14.43 ft of total dynamic head
Four terms, all converted to feet before they are added — mixing psi and feet in one sum is the most common error in a pump sheet. The velocity head term is genuinely tiny in domestic work (0.347 ft here, under 3% of the total) but costs nothing to include. For a sump the discharge-pressure term is exactly zero; for a well pump it usually dominates everything else.
Pressure-Reducing Valve Threshold
One formulaInput cells
- B2
- — Static pressure, psi · example 92
Paste into Excel
Named-range version
The example returns
92 psi → PRV required · 78 psi → no PRV required
IPC 604.8 puts the ceiling at 80 psi static for building water distribution. Measure at night — a system reading 78 psi at 4 pm can sit well over 80 psi at 4 am, and this cell will happily tell you the wrong thing from a daytime reading. Service lines to sill cocks and outside hydrants are excepted.
Thermal Expansion Volume
Needs a table: Water densityInput cells
- B2
- — System volume, gal · example 50
- B3
- — Cold °F · B4 hot °F · example 40 · 140
- B5
- — Supply psi · B6 ceiling psi · example 60 · 80
- F2:G19
- — Water density table (paste below) · example —
Paste into Excel
Named-range version
The example returns
1.71% expansion · 0.86 gal to absorb · 4.05 gal tank → a 4.4 gal shell
Water expands because it gets less dense, so the fraction is a ratio of two densities minus one — mass is conserved, volume is not. The 14.7 in both brackets is the whole formula: it is Boyle's law, so the pressures must be absolute, and using gauge pressure is the classic error that undersizes the tank. Note the ceiling is the 80 psi code threshold, not the 150 psi relief-valve setting — sizing against the relief valve makes almost every house look like it needs the smallest tank made.
Pressure Tank Drawdown
One formulaInput cells
- B2
- — Cut-in psi · B3 cut-out psi · example 30 · 50
- B4
- — Pre-charge psi · example 28
- B5
- — Pump gpm · B6 minimum run, min · example 10 · 1
Paste into Excel
Named-range version
The example returns
29.53% of the shell at a 30/50 switch · a 10 gpm pump needs a 44 gal tank
Absolute pressures again, and again it is Boyle's law. Because the answer is a ratio rather than a difference, the same 20 psi span delivers more at a lower band — 34.5% at 20/40 against 25.8% at 40/60. Widening the band is what actually helps: 30/70 reaches 45.1%. A "20 gallon" tank delivers about 5.9 gallons.
All five are closed-form and all five fit on one row of a sheet, which makes this the section worth building as a comparison table — put six heaters down the rows and let the first-hour rating column pick the winner.
Temperature Rise & Recovery Rate
One formulaInput cells
- B2
- — Input, BTU/hr · example 40000
- B3
- — Thermal efficiency · example 0.8
- B4
- — Temperature rise, °F · example 90
- B5
- — …or element kW, electric · example 4.5
Paste into Excel
Named-range version
The example returns
42.68 gph from a 40,000 BTU/hr gas heater at 80% · 20.48 gph from a 4.5 kW element
Recovery rate is what separates a gas heater from an electric one of the same size, and the gap is more than 2x on the same rise. 8.33 is the weight of a gallon of water and 1 BTU raises 1 lb by 1 °F, so the denominator is the energy to lift a gallon through the rise. Use the winter inlet temperature, not the summer one.
Tankless Flow Capacity
One formulaInput cells
- B2
- — Input, BTU/hr · example 199000
- B3
- — Thermal efficiency · example 0.95
- B4
- — Temperature rise, °F · example 70
Paste into Excel
Named-range version
The example returns
5.40 gpm at a 70 °F rise · 4.73 gpm at 80 °F
The constant is 499.8, not the 500 you will see everywhere — it is 8.33 lb per gallon times 60 minutes, and the rounded 500 is about 0.04% optimistic. Size on the winter rise: the same unit that gives 5.40 gpm at a 70 °F rise gives only 4.73 gpm at 80 °F, a 12.5% loss. Undersizing on the summer number is why tankless units disappoint in January.
First-Hour Rating
One formulaInput cells
- B2
- — Tank size, gal · example 40
- B3
- — Recovery, gph · example 42.68
Paste into Excel
Named-range version
The example returns
70.7 gal in the first hour from a 40 gal gas heater
This is the column to sort a comparison table on, not tank size. Only about 70% of a tank is usable before incoming cold dilutes delivery below setpoint, so recovery dominates the back half of the hour — which is how a 40 gal gas heater (70.7 gal) out-delivers a 50 gal electric one (55.5 gal).
Mixing Valve / Tempered Water Ratio
One formulaInput cells
- B2
- — Delivered °F · example 120
- B3
- — Cold inlet °F · example 50
- B4
- — Stored °F · example 140
- B5
- — Mixed flow, gpm · example 2.5
Paste into Excel
Named-range version
The example returns
77.8% hot · 1.94 gpm hot and 0.56 gpm cold of a 2.5 gpm draw · storage multiplier 1.286
The reciprocal of the hot fraction is a storage multiplier — at 77.8% hot, a 50 gal tank behaves like 64.3 gal. Storing at the delivery temperature gives no bonus at all (120/120 is 100% hot and a 1.00x multiplier) and parks the tank in the Legionella range. Note the cold inlet moves it the other way: a colder winter inlet raises the hot fraction exactly when recovery is slowest.
Gas Load → CFH
One formulaInput cells
- B2
- — Total connected load, BTU/hr · example 150000
- B3
- — Heating value, BTU/ft³ · example 1000 natural · 2516 propane
Paste into Excel
Named-range version
The example returns
150,000 BTU/hr on natural gas → 150 CFH
The simplest formula on the page and the one most often applied to the wrong number: sum the input ratings of every appliance downstream of the section you are sizing, not the whole house, and size each section for what it actually carries. Natural gas runs roughly 950 to 1,100 BTU/ft³, so confirm the local figure with the utility. Fuel gas is a separate code — IFGC 402.4 and NFPA 54, not the IPC.
The small arithmetic that decides how a system feels rather than whether it passes. How long the hot water takes to arrive, what a unit on a European spec sheet means in gpm, and what a drip actually costs over a year.
Pipe Volume & Gallons per Foot
One formulaInput cells
- B2
- — Inside diameter, inches · example 0.785 (3/4 in Type L copper)
- B3
- — Run length, ft · example 50
- B4
- — Flow while purging, gpm · example 2
Paste into Excel
Named-range version
The example returns
0.02514 gal/ft · 1.26 gal in 50 ft · 10.5 lb · 38 s to purge
The first cell collapses to the constant every plumber half-remembers: PI()/4 x 12 / 231 is 0.0408, so gallons per foot is 0.0408 x diameter squared. Two things fall out of it worth keeping. 40 ft of 3/4 inch copper is about a gallon, which is the mental shortcut for a purge or a chlorination charge. And because the volume goes as the square of the bore, upsizing a hot line makes the wait for hot water WORSE, not better — the fourth cell is the one that proves it.
Unit Conversion
Needs a table: Conversion factorsInput cells
- B2
- — Value to convert · example 10
- B3
- — From unit · example gpm
- B4
- — To unit · example lpm
- F2:H30
- — Conversion factor table (paste below) · example —
Paste into Excel
Named-range version
The example returns
10 gpm = 37.8541 L/min · 60 psi = 138.5 ft of head · 1 bar = 14.5038 psi
Every unit in a category carries a factor to that category's base, so one formula converts any pair: multiply into the base, divide out of it. Use exact matching, and keep the categories separate — nothing stops MATCH finding a length unit when you meant a volume. Temperature is the exception and cannot use this formula at all, because it is an offset scale rather than a ratio: °C to °F is =B2*9/5+32, and a temperature RISE converts by ratio alone, so a 90 °F rise is 50 °C and not 32.2. The other trap is the imperial gallon at 1.2009 US gallons — a 20% error hiding on any spec sheet that just says "gallons".
Leak & Water Waste Cost
One formulaInput cells
- B2
- — Drips per minute · example 60
- B3
- — Water rate, $ per 1,000 gal · example 5.50
- B4
- — Sewer rate, $ per 1,000 gal · example 7.00
- B5
- — Hot fraction, 0 to 1 · example 1
- B6
- — Temperature rise, °F · example 70
- B7
- — Heater efficiency · B8 $ per therm · example 0.8 · 1.40
Paste into Excel
Named-range version
The example returns
5.71 gpd = 2,083 gal/yr · $26.04/yr cold, $47.29/yr hot on gas
The /1000 is the term people drop, and dropping it inflates the answer a thousandfold — both utility rates are quoted per 1,000 gallons. The hot-water line is what almost every published leak calculator omits: the same drip is $26.04 a year cold and $47.29 hot, 1.82x, because you paid to heat it before it escaped — energy is 44.9% of the hot total. For an electric heater, divide by 3412.14 for kWh instead of 100,000 for therms. The drip constant is the USGS figure of 15,140 drips per gallon, which reconciles with a 0.25 mL drop.
Not code, and not physics — but the arithmetic that decides whether the job was worth doing, and the part of a plumbing spreadsheet most likely to be quietly wrong. Put your own rates in the input cells; the numbers below are the calculators' defaults, not a price book.
Job Price — Margin, not Markup
One formulaInput cells
- B2
- — Labour hours · B3 labour rate · example 10 · 110
- B4
- — Fixture cost · example 850
- B5
- — Material cost · example 450
- B6
- — Overhead, percent · example 15
- B7
- — Target margin, percent · example 25
Paste into Excel
Named-range version
The example returns
direct $2,400 → break-even $2,760 → $3,680 at margin ($920 profit) but only $3,450 at markup, which delivers 20.0% and $230 less
Two cells, one character apart, and the gap between them is the most expensive mistake in the trade. Margin divides by (1 − margin); markup multiplies by (1 + markup). They are not the same number and never have been: a 25% markup is exactly a 20% margin, which on this job is $230 of profit that simply does not arrive. Build both cells side by side in your sheet and the error becomes impossible to make. To hit a target margin from a markup, the markup needed is margin ÷ (1 − margin) — 25% margin needs a 33.3% markup.
Loaded Labour Rate
One formulaInput cells
- B2
- — Hourly wage · example 38
- B3
- — Labour burden, percent · example 32
- B4
- — Overhead per technician, per year · example 11000
- B5
- — Billable hours per year · example 1560
- B6
- — Target margin, percent · example 40
Paste into Excel
Named-range version
The example returns
$115,333 a year → $73.93 loaded → $123.22 bill rate, 3.24x the wage at 75% utilisation
The cell that matters is the fourth one down, not the wage at the top. Utilisation moves the bill rate further than pay does, and in the useful direction. Drop billable hours to 1,000 and the same technician must bill $192.22; lift them to 1,800 and it falls to $106.79. Raising the wage 20% only moves it to $145.51. Note 2080 is PAID hours a year, while B5 is the smaller number you can actually invoice — conflating the two is what produces a rate that looks fine and loses money.
Whole-House Repipe Cost
One formulaInput cells
- B2
- — Floor area, ft² · example 1800
- B3
- — Material rate, $ per ft² · example 5 PEX · 6 CPVC · 9 copper
- B4
- — Access factor · example 0.8 easy · 1.0 average · 1.6 difficult
- B5
- — Storeys · B6 bathrooms · example 1 · 2
- B7
- — Permit · B8 drywall repair · example 450 · 1500
- B9
- — Regional factor · example 0.85 / 1.0 / 1.25 / 1.5
Paste into Excel
Named-range version
The example returns
$10,950 = $6.08 per ft², band $9,308–$12,592
The rates in B3, B4 and B9 are input cells on purpose — they are your costs, not a code table, and a spreadsheet is the right place to keep your own. What is worth copying is the SHAPE: access is a multiplier, not an addition, so the levers compound rather than add. PEX through easy access is $9,150 and copper through difficult access is $27,870 — 3.05x on the same house. Note the per-ft² figure FALLS as the house grows, because permit and drywall repair are fixed, so quoting a flat rate per square foot loses money on small jobs.
Water Heater Replacement Cost
One formulaInput cells
- B2
- — Equipment cost · example 1100 (50 gal gas)
- B3
- — Labour hours · B4 labour rate · example 4 · 110
- B5
- — Upgrades total · example 270 (expansion tank + pan)
- B6
- — Permit · B7 haul away · example 200 · 60
- B8
- — Regional factor · example 1.0
Paste into Excel
Named-range version
The example returns
labour $440 → $2,070 total, equipment 53.1% of it, band $1,697–$2,443
This model bands at ±18%, not the ±15% every other cost formula here uses — water-heater jobs vary more than a repipe because what is behind the old unit is unknown until it comes out. Worth reproducing rather than tidying away. The upgrade cell is where a like-for-like swap turns into a project: a thermal expansion tank is required by IPC 607.3 on any closed system, and a gas tankless conversion typically adds a vent upgrade, a gas-line upsize and a condensate drain on top. The equipment-share cell is the useful one to show a customer — on a straight swap the box is barely half the bill, which is usually the opposite of what they expect.
The 8 formulas above that need data
These are tab-separated. Copy one, click the cell you want it to start in, and paste — Excel, Google Sheets and LibreOffice all split it into columns automatically. Each is generated from the same code our calculators read, so it matches the tool exactly.
Hunter's curve — WSFU to GPM
IPC Appendix E Table E103.3(3), 37 rows. The flushometer column is blank at the low end because those fixtures cannot occur there. Appendix E is an appendix — enforceable only where specifically adopted — and Hunter's curve runs high for modern low-flow fixtures, so the error is toward larger pipe.
| Fixture units | Flush tank gpm | Flushometer gpm |
|---|---|---|
| 1 | 3 | |
| 2 | 5 | |
| 3 | 6.5 | |
| 4 | 8 | |
| 5 | 9.4 | 15 |
| 6 | 10.7 | 17.4 |
| 7 | 11.8 | 19.8 |
| 8 | 12.8 | 22.2 |
| 9 | 13.7 | 24.6 |
| 10 | 14.6 | 27 |
| 12 | 16 | 28.6 |
| 14 | 17 | 30.2 |
| 16 | 18 | 31.8 |
| 18 | 18.8 | 33.4 |
| 20 | 19.6 | 35 |
| 25 | 21.5 | 38 |
| 30 | 23.3 | 41 |
| 35 | 24.9 | 43.8 |
| 40 | 26.3 | 46.5 |
| 45 | 27.7 | 49 |
| 50 | 29.1 | 51.5 |
| 60 | 32 | 55 |
| 70 | 35 | 58.5 |
| 80 | 38 | 62 |
| 90 | 41 | 64.8 |
| 100 | 43.5 | 67.5 |
| 120 | 48 | 72.5 |
| 140 | 52.5 | 77.5 |
| 160 | 57 | 82.5 |
| 180 | 61 | 87 |
| 200 | 65 | 91.5 |
| 250 | 75 | 101 |
| 300 | 85 | 110 |
| 400 | 105 | 126 |
| 500 | 124 | 142 |
| 750 | 170 | 178 |
| 1000 | 208 | 208 |
Fitting equivalent lengths — L/D ratios
Equivalent feet is L/D × bore ÷ 12, so one table covers every pipe size. Overwrite the third column with your fitting counts and the developed-length SUMPRODUCT reads it directly. These are ASPE and manufacturer design values, not code.
| Fitting | L/D ratio | Your count |
|---|---|---|
| 90 degree elbow | 30 | 0 |
| 45 degree elbow | 16 | 0 |
| Tee, straight through | 20 | 0 |
| Tee, through the branch | 60 | 0 |
| Ball valve, full open | 8 | 0 |
| Gate valve, full open | 8 | 0 |
| Globe valve | 340 | 0 |
| Swing check valve | 100 | 0 |
Minimum drain slope — IPC Table 704.1
Three rows is the entire table, which is why the nested IF above is honest rather than a shortcut. The last band has no upper size, so the IF ends with a bare else rather than a third comparison.
| Up to size (in) | Minimum slope (in/ft) | Percent grade |
|---|---|---|
| 2.5 | 0.25 | 2.08% |
| 6 | 0.125 | 1.04% |
| larger | 0.0625 | 0.52% |
Trap arm maximum length — IPC Table 909.1
Measured from the trap weir to the inner edge of the vent fitting. At the three smallest sizes the arm has fallen exactly one pipe diameter at maximum length; at 3 and 4 in it has fallen half a diameter, because the permitted slope halves.
| Trap arm size (in) | Max slope (in/ft) | Max developed length (ft) |
|---|---|---|
| 1-1/4" | 0.25 | 5 |
| 1-1/2" | 0.25 | 6 |
| 2" | 0.25 | 8 |
| 3" | 0.125 | 12 |
| 4" | 0.125 | 16 |
Stocked vent sizes
Used by the vent-size MATCH to round the half-diameter result up to something you can buy. The 1.25 in first row is the IPC 916.2 floor.
| Nominal size (in) |
|---|
| 1-1/4" |
| 1-1/2" |
| 2" |
| 2-1/2" |
| 3" |
| 4" |
| 5" |
| 6" |
| 8" |
Water density by temperature
Drives the thermal-expansion fraction. A uniform 10 °F grid from 40 to 200, so an approximate MATCH lands on the row below and the interpolation is straightforward. Note the 60 °F row is where the 0.4331 psi-per-foot constant comes from.
| Temperature (°F) | Density (lb/ft³) |
|---|---|
| 40 | 62.43 |
| 50 | 62.41 |
| 60 | 62.37 |
| 70 | 62.3 |
| 80 | 62.22 |
| 90 | 62.12 |
| 100 | 62 |
| 110 | 61.86 |
| 120 | 61.71 |
| 130 | 61.55 |
| 140 | 61.38 |
| 150 | 61.2 |
| 160 | 61.01 |
| 170 | 60.79 |
| 180 | 60.57 |
| 190 | 60.35 |
| 200 | 60.12 |
Fixture drainage units — IPC Table 709.1
28 fixtures. Overwrite the last column with your counts and SUMPRODUCT the DFU column against it. The blank trap cells are the fixtures with an integral trap — both bathroom groups, every water closet row and the urinals — where the trap is part of the fixture rather than a size you choose.
| Fixture | DFU | Trap size (in) | Your count |
|---|---|---|---|
| Bathroom group (1.6 gpf water closet) | 5 | 0 | |
| Bathroom group (over 1.6 gpf water closet) | 6 | 0 | |
| Water closet, private (1.6 gpf) | 3 | 0 | |
| Water closet, private (over 1.6 gpf) | 4 | 0 | |
| Lavatory | 1 | 1-1/4" | 0 |
| Bathtub (with or without shower) | 2 | 1-1/2" | 0 |
| Shower, up to 5.7 gpm | 2 | 1-1/2" | 0 |
| Shower, over 5.7 to 12.3 gpm | 3 | 2" | 0 |
| Kitchen sink, domestic | 2 | 1-1/2" | 0 |
| Dishwashing machine, domestic | 2 | 1-1/2" | 0 |
| Clothes washer, residential | 2 | 2" | 0 |
| Laundry tray (1 or 2 compartments) | 2 | 1-1/2" | 0 |
| Bidet | 1 | 1-1/4" | 0 |
| Floor drain | 2 | 2" | 0 |
| Sink | 2 | 1-1/2" | 0 |
| Water closet, public (1.6 gpf) | 4 | 0 | |
| Water closet, public (over 1.6 gpf) | 6 | 0 | |
| Water closet, flushometer tank | 4 | 0 | |
| Urinal | 4 | 0 | |
| Urinal, 1 gpf or less | 2 | 0 | |
| Urinal, nonwater supplied | 0.5 | 0 | |
| Shower, over 12.3 to 25.8 gpm | 5 | 3" | 0 |
| Shower, over 25.8 to 55.6 gpm | 6 | 4" | 0 |
| Service sink | 2 | 1-1/2" | 0 |
| Clothes washer, commercial | 3 | 2" | 0 |
| Drinking fountain | 0.5 | 1-1/4" | 0 |
| Wash sink (per faucet set) | 2 | 1-1/2" | 0 |
| Dental lavatory | 1 | 1-1/4" | 0 |
Building drain capacity — IPC Table 710.1(1)
Maximum drainage fixture units on a building drain or sewer, by slope. Paste the blanks as genuinely empty cells — an empty cell compares as zero, so a first-TRUE capacity search skips those rows correctly, whereas a dash or the word 'n/a' breaks the comparison. Blank means the slope is not permitted at that size, not that capacity is unlimited.
| Size (in) | 1/16 in/ft | 1/8 in/ft | 1/4 in/ft | 1/2 in/ft |
|---|---|---|---|---|
| 1-1/4" | 1 | 1 | ||
| 1-1/2" | 3 | 3 | ||
| 2" | 21 | 26 | ||
| 2-1/2" | 24 | 31 | ||
| 3" | 36 | 42 | 50 | |
| 4" | 180 | 216 | 250 | |
| 5" | 390 | 480 | 575 | |
| 6" | 700 | 840 | 1000 | |
| 8" | 1400 | 1600 | 1920 | 2300 |
| 10" | 2500 | 2900 | 3500 | 4200 |
| 12" | 3900 | 4600 | 5600 | 6700 |
| 15" | 7000 | 8300 | 10000 | 12000 |
Branches and stacks — IPC Table 710.1(2)
Use the column that matches what you are sizing — a horizontal branch, a short stack or a tall one. The counter-intuitive column is the last: a TALLER stack carries more per size than a short one, because terminal-velocity annular flow only develops with height. A 2 in stack takes 10 fixture units over three branch intervals and 24 over more than three.
| Size (in) | Horizontal branch | Stack, 3 intervals or fewer | Stack, over 3 intervals |
|---|---|---|---|
| 1-1/2" | 3 | 4 | 8 |
| 2" | 6 | 10 | 24 |
| 2-1/2" | 12 | 20 | 42 |
| 3" | 20 | 48 | 72 |
| 4" | 160 | 240 | 500 |
| 5" | 360 | 540 | 1100 |
| 6" | 620 | 960 | 1900 |
| 8" | 1400 | 2200 | 3600 |
| 10" | 2500 | 3800 | 5600 |
| 12" | 3900 | 6000 | 8400 |
| 15" | 7000 |
Septic tank minimums by bedroom count
Common published minimums rather than a single national code — septic falls to state and county health departments, so confirm the local figures before relying on these. The last row has no upper bedroom count, so a first-TRUE search rather than an exact match is the right lookup.
| Up to bedrooms | Minimum tank (gal) |
|---|---|
| 3 | 1000 |
| 4 | 1250 |
| 5 | 1500 |
| 6 | 1750 |
| more | 2000 |
Unit conversion factors
Every unit carries a factor to its category's base unit — gpm for flow, psi for pressure, gallons for volume, inches for length, ft/s for velocity. Multiply into the base and divide out of it. Temperature is deliberately absent: it is an offset scale, not a ratio, so it needs its own formula and cannot use this table.
| Category | Unit | To base |
|---|---|---|
| flow | gpm | 1 |
| flow | gph | 0.016666666666666666 |
| flow | lpm | 0.26417205235814845 |
| flow | lps | 15.850323141488905 |
| flow | m3h | 4.402867539302474 |
| flow | cfs | 448.8312 |
| flow | ukgpm | 1.200949925504855 |
| pressure | psi | 1 |
| pressure | ftH2O | 0.4331 |
| pressure | mH2O | 1.4209317585245 |
| pressure | bar | 14.503773773 |
| pressure | kpa | 0.1450377377 |
| pressure | atm | 14.695948775 |
| volume | gal | 1 |
| volume | l | 0.26417205235814845 |
| volume | ft3 | 7.48052 |
| volume | m3 | 264.17205235814845 |
| volume | in3 | 0.004329004329004329 |
| volume | ukgal | 1.200949925504855 |
| length | in | 1 |
| length | ft | 12 |
| length | mm | 0.03937007874015748 |
| length | cm | 0.39370078740157477 |
| length | m | 39.37007874015748 |
| velocity | fps | 1 |
| velocity | fpm | 0.016666666666666666 |
| velocity | mps | 3.280839895 |
| velocity | kph | 0.9113444152777778 |
Which Excel, and will the numbers match?
XLOOKUP needs a recent Excel
XLOOKUP arrived in Microsoft 365 and
Excel 2021. Every lookup on this page is given in the
INDEX /
MATCH form as the pasteable version
precisely because that form works in every Excel back to 2007, and in LibreOffice Calc
unchanged. The named-range versions use XLOOKUP where it reads better. In Google Sheets the
fallback is a courtesy rather than a necessity — there is no old version of Sheets, so
everyone there already has XLOOKUP, LAMBDA, LET and named functions.
Exact match or approximate
The third argument of MATCH is not a
detail. Use 0 for a listed size — a trap arm is 1-1/2 in or it is not.
Use 1 for a curve you are reading between anchors, like Hunter's, and note
that a 1 requires the lookup column to be sorted ascending, which every table here already is.
Rounding agrees with our calculators
Excel's ROUND rounds a half away from
zero, which is the same rule our calculators display with. So
=ROUND(23.615,2) gives 23.62 here and
23.62 there. Beware the other direction: some languages round a half to even and would give
23.61 on the same number. If a figure disagrees with a calculator by one in the last decimal,
this is almost always why.
Working in Google Sheets?
Every formula on this page pastes into Sheets unchanged. What changes is the shape of the
sheet you build around them: one
ARRAYFORMULA governing a whole column
instead of a formula per cell,
QUERY instead of a pivot table, and named
functions instead of a 189-character interpolation.
Open the Google Sheets reference →
Constants here run to more digits
A few constants appear on the formula reference page in their familiar rounded form — 0.408 for velocity, 0.433 for head, 500 for the water-heating denominator. The formulas here use the fuller values our code actually runs on, 0.4085, 0.4331 and 499.8, so your sheet lands on the calculator's answer rather than near it. The difference is under a tenth of a percent in each case, and never changes a pipe size.
Sources & standards: International Plumbing Code (IPC) 2021 — 604.1, Table 604.3, 604.8, 607.1.2, 607.3, 704.1, Table 709.1, Tables 710.1(1) and 710.1(2), 906.2, Table 909.1, 916.2, and Appendix E Tables E103.3(2) and E103.3(3). Grease interceptor ratings follow PDI-G101. Gas figures come from the International Fuel Gas Code (IFGC) 402.4 and NFPA 54, which are a separate code from the IPC. Velocity limits, fitting equivalent lengths, and Hazen-Williams and Manning coefficients are ASPE and manufacturer design practice, not code requirements.
Plumbing code adoption is split: much of the country is on the IPC, while other states use the Uniform Plumbing Code (UPC), which differs on fixture-unit tables, drain slope allowances, and velocity limits. Confirm which code your jurisdiction has adopted, and which edition. Local amendments override the model code, and a licensed plumber plus the AHJ have final say on anything installed.
A spreadsheet is only as current as the day it was built. If you save a copy of these formulas and a table changes in a later code cycle, nothing in your file will tell you. That is the one real argument for working an answer here as well — the calculators are maintained against the code, and your copy is not.
Model it in a sheet. Quote it somewhere better.
A spreadsheet is the right tool for everything on this page — iterate a pipe size, sweep a temperature rise, work out what your bill rate has to be, or see what a 25% markup really delivers as margin. That is modelling, and a sheet is where it belongs. Producing the document a customer signs is a different job: it needs line items, versions and a record of what was agreed, and a workbook holding your price book starts going stale the day you save it. Model the numbers here, then let TradesQuote turn the scope into a line-item estimate your client can accept online.