Plumbing Pipe Sizing Calculator (IPC) avatar

Plumbing Pipe Sizing Calculator (IPC)

Pricing

Pay per event

Go to Apify Store
Plumbing Pipe Sizing Calculator (IPC)

Plumbing Pipe Sizing Calculator (IPC)

IPC plumbing sizing from plain text: fixture units, peak water demand (Hunter's method) and water service, cold and hot pipe sizes with a pressure check, building drain, branch, stack and vent sizes, and pipe velocity and friction loss.

Pricing

Pay per event

Rating

0.0

(0)

Developer

Jumble Mog

Jumble Mog

Maintained by Community

Actor stats

0

Bookmarked

2

Total users

1

Monthly active users

16 days ago

Last modified

Features

Limited permissions

Share

Size the water supply and drain pipes for a list of plumbing fixtures by the International Plumbing Code, from one line of text. Ask 2 bathrooms, kitchen sink, dishwasher, clothes washer, 2 hose bibbs, water supply for 2.5 baths, kitchen sink, dishwasher, clothes washer, PEX, 60 psi, 20 ft elevation, 120 ft developed length or 12 gpm through 3/4 in PEX, 80 ft and you get back:

  • Fixture units for every fixture: water supply fixture units (cold, hot and total, private or public) and drainage fixture units, with each fixture's trap size, minimum supply pipe and minimum flow pressure.
  • Peak demand in gpm by Hunter's method (IPC Appendix E, Table E103.3(3)), with the flush valve curve when there are flushometer valves.
  • Water pipe sizes: the water service and the cold and hot mains in copper (type K, L or M), PEX, CPVC, PVC or galvanized steel, kept under the velocity limit and, when you give the street pressure and length, under the friction the pressure allows (the Appendix E method: elevation, meter loss and the fixture's minimum pressure taken off first).
  • Drain sizes: the building drain at your slope (and at every slope), the horizontal branch, the stack and the minimum vent (Tables 710.1(1) and 710.1(2), 906.2).
  • One pipe: velocity and Hazen-Williams friction loss at a flow, or the smallest size that stays under 8 ft/s.
  • A chart and a Markdown report for each request.

It's made for:

  • Plumbers, contractors, remodelers and DIYers checking pipe sizes for a house, addition or tenant fit-out.
  • Designers, estimators, inspectors and students who want the fixture unit math done and shown.
  • AI agents and building or quoting apps that need code-based plumbing sizes they can explain.

A chart made by this Actor for a house with 2 bathrooms, a kitchen sink, dishwasher, clothes washer and 2 hose bibbs: 16.4 water supply fixture units and 18.2 gpm, with the velocity in each copper size (1 in chosen at 7.1 ft/s under the 8 ft/s limit), and 16 drainage fixture units on a 3 in building drain at 1/4 in per foot

How to use it

  1. Write Requests, one per entry. The form has examples.
  2. Optionally set the Default pipe material (copper type L otherwise) and Default occupancy (private homes or public buildings).
  3. Click Start. Each request is a row in the results, with its summary, chart and report.

What you can write

You writeIt means
2 bathrooms, 2.5 baths, half bath, powder roomBathroom groups (a water closet, lavatory and tub or shower), half baths add a water closet and a lavatory
kitchen sink, dishwasher, clothes washer, laundry tray, bar sink, service sinkKitchen and laundry fixtures
3 water closets, toilets, 4 lavatories, 2 urinals, showers, bathtub, bidetBathroom fixtures, counted one by one
floor drain, hose bibbs, drinking fountainOthers; kitchen sink x 2 counts too
45 WSFU, 120 DFUFixture units you already have
water supply, drainageOnly one side (both by default)
public, restroom, office; flush valvesPublic fixture units; flushometer valve fixtures
PEX, CPVC, type K copper, PVC, galvanizedPipe material
60 psi, 20 ft elevation or 3-story, 120 ft developed length, meter loss 5 psi, fittings 30%The pressure check
1/8 in per ft, 2% slopeBuilding drain slope (1/4 in per ft by default)
12 gpm through 3/4 in PEX, 80 ft, 25 gpm copper, max 6 ft/sOne pipe

The same as an object: {"fixtures": {"kitchen sink": 1, "bathroom group": 2}, "type": "supply", "pressure": "50 psi", "length": "100 ft", "material": "CPVC"} or {"type": "drain", "dfu": 120, "slope": "1/4"}.

Examples

  • 2 bathrooms, kitchen sink, dishwasher, clothes washer, 2 hose bibbs → 16.4 WSFU, 18.2 gpm: 1 in type L copper service and mains; 16 DFU on a 3 in building drain at 1/4 in/ft, 3 in stack, 1-1/2 in vent.
  • water supply for 2.5 baths, kitchen sink, dishwasher, clothes washer, PEX, 60 psi, 20 ft elevation, 120 ft developed length → 14.3 WSFU, 17.1 gpm; 60 - 8.7 (elevation) - 20 (shower minimum) = 31.3 psi over 180 ft equivalent = 17.4 psi per 100 ft; 1-1/4 in PEX service and cold main, 1 in hot main.
  • drainage for 3 bathroom groups, kitchen sink, clothes washer, laundry tray, floor drain, 1/8 in per ft → 23 DFU: 3 in building drain (36 DFU at 1/8 in/ft), 4 in if all on one horizontal branch (3 in carries 20), 3 in stack.
  • public restroom water supply: 4 water closets with flush valves, 3 urinals, 4 lavatories, drinking fountain, 55 psi, meter loss 6 psi, length 150 ft → 63.25 WSFU on the flush valve curve = 55.3 gpm: 2 in service.
  • 12 gpm through 3/4 in PEX, 80 ft → 10.9 ft/s (over 8 ft/s: use 1 in), 29.6 psi per 100 ft, 23.7 psi over 80 ft.

How-to examples

Each example is a complete input; the results are from runs of the Actor (also listed under Examples).

How to size water supply and drain pipes for a house (IPC)

{"requests": ["2 bathrooms, kitchen sink, dishwasher, clothes washer, 2 hose bibbs"]}

Result: 16.4 WSFU and 18.2 gpm: a 1 in type L copper service and mains; 16 DFU on a 3 in building drain at 1/4 in/ft, a 3 in stack and a 1-1/2 in vent.

How to size a water service with a pressure check

{"requests": ["water supply for 2.5 baths, kitchen sink, dishwasher, clothes washer, PEX, 60 psi, 20 ft elevation, 120 ft developed length"]}

Result: 14.3 WSFU and 17.1 gpm; 60 − 8.7 (elevation) − 20 (shower minimum) = 31.3 psi over 180 ft equivalent, 17.4 psi per 100 ft; a 1-1/4 in PEX service and cold main and a 1 in hot main.

How to find pipe velocity and friction loss for a flow

{"requests": ["12 gpm through 3/4 in PEX, 80 ft"]}

Result: 10.9 ft/s, over 8 ft/s, so use 1 in; 29.6 psi per 100 ft and 23.7 psi over 80 ft.

How to let an AI agent size plumbing

Add this Actor to the Apify MCP server with https://mcp.apify.com/?tools=jumblemog/plumbing-calculator. The agent lists the fixtures in one line and answers with the fixture units, demand in gpm and the pipe sizes.

FAQ

Which code does it follow? The International Plumbing Code: fixture units from Table 709.1 and Appendix E, Hunter's curve for demand, drains from Table 710.1 and vents by 906.2.

Does it handle flush valves and public restrooms? Yes. public restroom water supply: 4 water closets with flush valves, 3 urinals, ... uses the public fixture units and the flush valve curve: 63.25 WSFU, 55.3 gpm and a 2 in service.

Which pipe materials does it know? Copper, PEX, CPVC, PVC and galvanized steel, with Hazen-Williams friction on the actual inside diameters.

Does it follow the UPC? No. UPC fixture units and tables differ, and your local code and the authority having jurisdiction have the final word.

Input

FieldWhat it is
requestsRequests, as lines of text or objects (up to 200 per run)
material, occupancyDefaults when a request doesn't say
chartsDraw a chart for each request (default on)

Output

One dataset item per request, also saved together in the run's OUTPUT record:

{
"request": 1, "status": "ok", "type": "both", "title": "Plumbing sizing",
"summary": "2 bathroom groups, 1 kitchen sink, 1 dishwasher, 1 clothes washer standpipe, 2 hose bibbs. Water: 16.4 WSFU, 18.2 gpm; service 1\", cold 1\", hot 1\" (Copper tube type L). Drainage: 16 DFU; building drain 3\" at 1/4 in/ft, stack 3\", vent at least 1-1/2\".",
"fixtures": [{"fixture": "Bathroom group (water closet, lavatory, tub or shower)", "count": 2, "dfuEach": 5, "dfu": 10, "trap": "3\"",
"wsfuCold": 5.4, "wsfuHot": 3, "wsfu": 7.2, "minSupply": null, "minPressure": 20, "flushValve": false}],
"wsfu": {"cold": 12.4, "hot": 6.4, "total": 16.4},
"demand": {"totalGpm": 18.16, "coldGpm": 16.2, "hotGpm": 11.14, "flushValve": false},
"pipeSizes": {"service": "1\"", "coldMain": "1\"", "hotMain": "1\""},
"dfu": 16, "slope": 0.25,
"drainSizes": {"buildingDrain": "3\"", "horizontalBranch": "3\"", "stack3Intervals": "3\"", "stackOver3Intervals": "3\"", "vent": "1-1/2\""},
"units": {"pressure": "psi", "flow": "gpm", "length": "ft", "size": "in", "velocity": "ft/s", "friction": "psi per 100 ft"},
"imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-Plumbing-sizing.png"
}

Items also have pipeTable (every size with its velocity and friction), pressure (the pressure budget), drainBySlope and drainCapacity, warnings, notes (every assumption), a Markdown report and links to the chart and report. A pipe request has velocity, friction, loss and frictionCurve. A request that can't be computed has "status": "failed" and the reason in error, and isn't billed.

How it works

  1. Fixture units come from IPC Table 709.1 (drainage) and Table E103.3(2) (water supply, private or public), with 6 DFU for water closets over 1.6 gpf.
  2. Demand is read from Table E103.3(3) (Hunter's curve), interpolated, separately for the total, the cold and the hot water.
  3. Water pipes: the smallest size that keeps velocity under 8 ft/s (5 ft/s for hot water in copper) and, with a pressure check, friction under (street pressure − 0.433 psi per ft of elevation − meter loss − the highest fixture minimum of Table 604.3) ÷ (developed length + 50% for fittings). The water service is at least 3/4 in (603.1).
  4. Drains: the smallest size whose capacity in Table 710.1(1) or 710.1(2) covers the DFU, never less than 3 in with a water closet or than the largest trap; vents by 906.2.
  5. Friction is Hazen-Williams with C = 140 for copper, 150 for plastics and 100 for galvanized steel, on the actual inside diameters.

Pricing

You pay one low price per request, at the price shown on this page. The chart and report are included. Requests that can't be computed are never charged. If you set a maximum cost per run, the Actor stops before a request that wouldn't fit.

Speed

A request takes milliseconds. A run through the API answers in about 10 seconds, including the cloud container starting.

Tips and limits

  • This is a design aid. Your local code (IPC, UPC or a state amendment), the authority having jurisdiction and the fixture makers have the final word; UPC fixture units and tables differ.
  • Drains are sized for the total DFU on one pipe. Size each branch with its own fixtures as a separate request. Vent lengths (Table 906.1), sumps, ejectors, indirect wastes and storm drains aren't covered.
  • Water: meter losses depend on the meter, so give meter loss 5 psi (0 otherwise); high-demand fixtures (fire sprinklers, irrigation, commercial equipment) need their own gpm added.
  • Limits: 200 requests per run.

For AI agents and developers

This Actor works with the Apify MCP server, so AI agents can call it as a tool. Pass requests as plain text and read summary, pipeSizes, drainSizes and warnings. A direct API call that waits for the answer:

curl -X POST "https://api.apify.com/v2/acts/jumblemog~plumbing-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"requests": ["3 bathrooms, kitchen sink, dishwasher, clothes washer, PEX, 55 psi, 100 ft developed length"]}'

run-sync instead returns the run's OUTPUT: the status, the counts and every result as JSON.

In Python, with the apify-client package:

from apify_client import ApifyClient
client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/plumbing-calculator").call(run_input={
"requests": [{"fixtures": {"water closet": 6, "lavatory": 6, "urinal": 2}, "occupancy": "public", "flushValve": True}],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
print(item["summary"])

Credits

  • Method: the International Plumbing Code 2021 (International Code Council): Tables 709.1, 710.1(1), 710.1(2), 604.3 and 604.5, and Appendix E. This Actor is not affiliated with the ICC.
  • Charts: Vega-Lite and vl-convert (BSD-3-Clause), with the Inter font (SIL Open Font License).