# Plumbing & Pipe Flow Calc Pipe volume, flow velocity, Hazen-Williams pressure loss, pipe sizing by velocity, thermal expansion, drain slope, tank fill time and bucket flow tests. ## How to pay Machine-payable over x402. USDC on: Base (eip155:8453), Solana (solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp), Polygon (eip155:137), Arbitrum One (eip155:42161). No accounts. No API keys. No signup. The paying wallet is the account. ## Machine-readable - OpenAPI: https://plumbing-calc.x402tookit.com/openapi.json - x402 manifest: https://plumbing-calc.x402tookit.com/.well-known/x402 - Catalog (free): https://plumbing-calc.x402tookit.com/catalog - Health (free): https://plumbing-calc.x402tookit.com/health - Uptime (free): https://plumbing-calc.x402tookit.com/uptime ## Endpoints (8) ### GET /bucket-test — $0.02 Flow rate in gpm and litres per minute from a bucket test: container volume and seconds to fill, with a daily-use estimate. Params: volume: number, unit?: string, seconds: number, pressurePsi?: number Example: https://plumbing-calc.x402tookit.com/bucket-test?volume=5&unit=gal&seconds=30 ### GET /drain-slope — $0.02 Fall needed for a drain run at a given slope in inches per foot, or the slope of a measured fall, with typical code minimums. Params: runFeet: number, inchesPerFoot?: number, fallInches?: number, pipeDiameterInches?: number Example: https://plumbing-calc.x402tookit.com/drain-slope?runFeet=20&inchesPerFoot=0.25&pipeDiameterInches=2 ### GET /flow-velocity — $0.02 Water velocity in feet per second from flow in gpm and pipe size, or the flow a pipe carries at a chosen velocity. Params: nominalSize?: string, material?: string, insideDiameterInches?: number, flowGpm?: number, velocityFps?: number Example: https://plumbing-calc.x402tookit.com/flow-velocity?nominalSize=3%2F4&material=pvc-40&flowGpm=5 ### GET /pipe-size — $0.02 Smallest standard copper Type L or PVC Schedule 40 pipe that keeps water under a maximum velocity at your flow rate. Params: flowGpm: number, material?: string, maxVelocityFps?: number Example: https://plumbing-calc.x402tookit.com/pipe-size?flowGpm=10&material=copper-l&maxVelocityFps=5 ### GET /pipe-volume — $0.02 Water held in a run of pipe in gallons and litres per foot and in total, from nominal size or inside diameter. Params: nominalSize?: string, material?: string, insideDiameterInches?: number, lengthFeet: number Example: https://plumbing-calc.x402tookit.com/pipe-volume?nominalSize=3%2F4&material=copper-l&lengthFeet=100 ### GET /pressure-loss — $0.02 Friction pressure loss in psi (and feet of head) over a pipe run by the Hazen-Williams formula, from flow, size and C factor. Params: nominalSize?: string, material?: string, insideDiameterInches?: number, flowGpm: number, lengthFeet: number, cFactor?: number Example: https://plumbing-calc.x402tookit.com/pressure-loss?nominalSize=3%2F4&material=copper-l&flowGpm=10&lengthFeet=100 ### GET /tank-fill-time — $0.02 Time to fill or drain a tank from its volume or round tank size and flow in gpm, with an optional outflow. Params: volumeGallons?: number, volumeLiters?: number, tankDiameterInches?: number, waterDepthInches?: number, inflowGpm: number, outflowGpm?: number Example: https://plumbing-calc.x402tookit.com/tank-fill-time?volumeGallons=50&inflowGpm=5 ### GET /thermal-expansion — $0.02 How much a pipe run lengthens or shortens with temperature for copper, steel, PVC, CPVC, PEX or ABS, in inches and mm. Params: material: string, lengthFeet: number, fromF: number, toF: number, coefficientPerF?: number Example: https://plumbing-calc.x402tookit.com/thermal-expansion?material=copper&lengthFeet=100&fromF=50&toF=120 ## Terms Plumbing arithmetic computed locally from the numbers given, using standard hydraulic formulas and published pipe dimensions, provided as is. These are planning estimates: real systems also have fittings, valves, elevation, water temperature and local plumbing codes that govern what is permitted. Not a code-compliance check and not a substitute for a licensed plumber or engineer.