CodeX

Building codes by trade and place

Ask the code.
Get the section.

CodeX is a code reference for electricians, plumbers, HVAC technicians and building inspectors. Ask in your own words, say where the job is, and get the sections that govern the work, each one linked to the publisher's official text.

Request beta accessSee how it works

In beta for iPhone and Android. Not in the app stores yet.

Lookup codeHouston, TX · IPC 2021

How much fall does a 4" sanitary pipe have to have?

IPC §704.1 Slope of horizontal drainage piping (Table 704.1)

Horizontal drainage piping must be installed in uniform alignment at a uniform slope. Minimum slope: 2-1/2 inches and smaller: 1/4 inch per foot (2 percent); 3 inches to 6 inches: 1/8 inch per foot (1 percent); 8 inches and larger: 1/16 inch per foot (0.5 percent). A 4-inch sanitary line therefore needs at least 1/8 inch of fall per foot under the IPC.

Open in the ICC viewer
Did this answer your question?YesCloseNoExplain
449code sections summarized, in 5 books
51states and D.C., plus 14 cities and counties
0bars of signal needed to look up a section

Three ways to ask

The dropdown above the question box decides what a question does.

Free · offline

Lookup code

The matching sections of the code book, from the library on the phone. Type a question the way you would say it, or a section number. Nothing leaves the device.

Uses your AI provider

Explain code

A short written answer built only from those sections. Every requirement is cited, like [§704.1], and each citation opens the section so you can check it.

Brand and part number

Install guide & parts

Type a brand and a model or part number. CodeX searches the manufacturer's own site for the installation instructions and the parts list, and you can save them to the phone.

Pick your profession

Each profession is its own silo: its code book, its example questions and its own job history. Switch from the top of the screen.

Electrician

NEC 2023 143 sections

Install and maintain wiring, panels and lighting systems, strictly following the National Electrical Code (NEC) to prevent fire and shock hazards.

  • Where is GFCI protection required in a house?
  • How far apart do wall receptacles have to be?
  • What size ground wire for a 100 amp circuit?

One reference book everywhere, with a note on the edition your state enforces where CodeX knows it.

Plumber

IPC 2021 100 sections or UPC 2021 64 sections

Design and assemble water supply, sanitary drainage and gas piping systems, complying with regional plumbing codes to keep drinking water safe and prevent contamination and gas leaks.

  • How much fall does a 4" sanitary pipe have to have?
  • How far can a 2" trap arm run before the vent?
  • How high does a washing machine standpipe need to be?

The book follows the place: CodeX uses the one the state, county or city adopted.

HVAC Technician

IMC 2021 73 sections

Set up heating, ventilation, air conditioning and refrigeration equipment. Mechanical and fuel-gas codes govern the work: fuel safety, exhaust and refrigerant handling.

  • How long can a dryer vent be?
  • What slope does a condensate drain need?
  • Do I need a secondary drain pan under an attic air handler?

One reference book everywhere, with a note on the edition your state enforces where CodeX knows it.

Building Inspector

IBC 2021 69 sections

Review structural, electrical and plumbing work on site, using the International Building Code (IBC) and local ordinances to approve or reject active construction.

  • How high does a guard have to be?
  • What is the maximum riser height for a stair?
  • How wide does an exit door have to be?

One reference book everywhere, with a note on the edition your state enforces where CodeX knows it.

Elevator Mechanic

Library not in CodeX yet

Install and safety-test vertical transport systems, in strict adherence to specialized elevator and electrical safety codes.

Governed by ASME A17.1 / CSA B44 and NEC Article 620. You can choose the profession now; the library comes later.

Made for the job site

It knows where the job is

Pick the state, county or city, or use your location once. Plumbers get the IPC or the UPC by what the place adopted. Electricians see which NEC edition the state enforces.

It works with no signal

The code library ships inside the app. Save the adopted code, local amendments or an installation guide to the phone for the crawl space and the basement.

Hands-free

Tap the mic and ask. The answer is read aloud, and you can say "explain", "yes", "no" or "done" with your hands full.

Every question is a job

A question stays open until you mark it done, then becomes one line in recent activity. Tuesday's measurement is one tap away on Friday.

Maps and 811

Utility maps, county GIS and the 811 locate service for the place you chose, next to the code.

What pipe goes where

For plumbers, a materials quick reference for the place: what is allowed for the sewer, the drain and the water service, with the local amendments CodeX has on record.

A reference, not the code

The section text in CodeX is our own summary with the governing numbers. It is not the official code text, and it can be incomplete, out of date or wrong. States, counties and cities adopt different editions and amend them, and a written answer comes from an AI model that can misapply a section even when it cites one.

That is why every section links to the publisher's own viewer, and why the professional remains responsible for following the code as adopted and enforced where the work is. Confirm with the authority having jurisdiction. The full terms are in the license agreement.

Try it on your next job

CodeX is in beta on iPhone and Android. Tell us your trade and your phone, and we will write back when there is a build for you.

Request beta access