What a P-Trap Is and the Job It Does
On this page
Look under your bathroom sink and you will see a pipe that dips down into a U and then bends back up before heading into the wall. That bend is the P-trap. It is one of the few plumbing parts you can point to without opening a wall, and it does a job that has nothing to do with carrying water away. Its real purpose is to hold a small pool of water in place so that the sewer system on the other side stays sealed off from the air you breathe.
That pooled water is the whole point. The pipe could be straight and still drain your sink just fine. The bend exists so that water stays trapped at the bottom of the curve at all times, and that standing water is what stops gas, odor, and pests from traveling backward up the drain. Understanding this one part makes a lot of later plumbing problems easier to place, because almost every fixture in your home depends on a working trap.
The Curved Pipe and the Water Plug Inside It
A P-trap is a U-shaped section of drainpipe that holds a permanent pool of water, and that trapped water, not the pipe itself, is the working part. The name comes from the shape: a U-bend followed by a horizontal arm into the wall, which from the side looks like a sideways letter P.
Here is the part most people miss. The bend is not there to slow the water down or to catch debris. It is there so that after the sink finishes draining, water naturally settles and stays in the low point of the U. That retained water is called the trap seal. It forms a liquid plug that fills the pipe across its whole diameter, so there is no open air path from the sewer side of the trap to the room side.
Think of it as a water valve that never needs a switch. Every time you run the faucet, fresh water flows through and refreshes the pool, then the excess drains away and a new seal settles into place. The model plumbing codes used across the United States require a measurable depth of water in that seal, generally not less than 2 inches and not more than 4 inches, because too shallow a pool can be blown or pulled out and too deep a one resists flow. The exact requirement is set by the plumbing code your local jurisdiction has adopted, so verify locally if you need the precise figure for permitted work.
If you want the step-by-step for taking a trap apart or clearing one, that lives in our guide on how to clean a sink P-trap (post 031). This post is about what the part is and why it is there.
How a Standing Pool of Water Blocks Sewer Gas
The trapped water blocks sewer gas by physically filling the pipe, so gas rising from the drain system hits a wall of liquid it cannot pass through. As long as the seal holds, the sewer stays on its side and the room stays on yours.
Drain systems are open to the sewer or septic system at the far end, and that environment produces gas. Sewer gas is a mix that can include hydrogen sulfide, methane, ammonia, and other compounds. Hydrogen sulfide is the one most people notice first because it carries the classic rotten egg smell, and the U.S. Occupational Safety and Health Administration lists it under the common name sewer gas. At the low concentrations typical of a household with a dried out trap, the main effects reported are irritation of the eyes, nose, and throat along with headaches and nausea. The seal exists so that this gas, and the odor that announces it, has nowhere to go but back down the line.
Every drain in your home connects to that same shared system, which is why every drain needs its own water plug. Without the seal, a drain becomes an open pipe straight to the sewer. The detail of how sewer gas affects health, and what to do if you smell it, is a hazard topic in its own right and is covered in our guide on sewer gas in the home (post 152). Here the point is simpler: the water is the barrier, and keeping the water in place is the entire function of the trap.
Every Fixture Has One: Sinks, Tubs, Showers, and Floor Drains
Every plumbing fixture that drains into the sewer has a trap, not just sinks. Model plumbing codes require each fixture to be separately trapped by a liquid-seal trap, with limited exceptions, so the U-bend you can see under the sink has a counterpart on every drain in the house.
Some of these traps are easy to spot and some are hidden. Under a sink the trap is right out in the open. For a bathtub or shower it usually sits below the floor or behind an access panel, which is why you do not see a visible bend at the drain. A toilet is the exception you do not have to think about: its trap is built into the porcelain itself, the curved internal passage that water swirls through when you flush, so it does not need a separate U under the floor. Floor drains in basements, garages, and laundry rooms have traps too, set down in the slab.
A few setups put two basins on a single trap, such as a double-bowl kitchen sink, which the code allows within limits. The general rule still holds: if waste water leaves a fixture and heads for the sewer, a water seal stands between that fixture and the gas on the other side. Knowing this helps when you are trying to figure out where a smell is coming from, because the culprit is almost always a trap somewhere that has lost its water. The diagnosis side of that, why a particular sink smells, is covered in our guide on a sink that smells like sewage (post 032).
Why a Trap Seal Dries Out or Gets Siphoned Away
A trap loses its seal in two main ways: the water evaporates because the fixture sits unused, or the water gets pulled out by suction when a large slug of water drains through. Either way the pool drops below the level it needs to block gas, and the barrier fails.
Evaporation is the quiet one. The water in a trap is just sitting there, and over weeks of no use it slowly evaporates into the air. A guest bathroom, a basement floor drain, a sink in a vacant home, or a fixture in a room you keep closed can all go dry simply from disuse, and the first sign is usually a faint sewer odor near that drain. Dry air and warm conditions speed it up. This is why a drain you never touch can start to smell while the ones you use every day never do. The everyday fix is nothing more than running water into the fixture to refill the trap, and pouring water into floor drains every few weeks keeps them sealed.
Siphoning is the active one. When a large volume of water rushes down a drain, the moving column can create suction behind it, and that suction can pull the standing water right out of the trap, leaving the U-bend empty. Properly vented drains prevent this by letting air into the line to break the suction, which is the reason your drains connect to vent pipes. The full story of how vents protect the seal is its own subject, covered in our guide on why plumbing vents matter (post 005). The takeaway here is that a trap can be defeated by drying out or by being sucked dry, and both leave you with the same result: an open path to the sewer.
P-Trap vs. S-Trap: Why the Shape Was Changed
The difference between a P-trap and an S-trap is the direction the pipe exits the bend: a P-trap turns horizontally into the wall, while an S-trap drops straight back down through the floor. That horizontal arm is the upgrade, because it makes the trap far less likely to siphon itself dry.
Older homes were often plumbed with S-traps, where the drain curves up and then immediately back down into the floor in an S shape. The problem is geometry. When water drains through an S-trap, the column of water continuing straight down can act like a siphon and pull the trap seal down with it, the same suction effect described above. An S-trap has no easy way to admit air to stop that pull, so it can lose its seal on a single fast drain. For that reason the model plumbing codes used in the United States generally prohibit S-traps in new work, and many jurisdictions list them among prohibited trap types.
The P-trap solves it with that sideways arm. The horizontal run into the wall breaks the straight downward column of water, and it gives the drain a place to connect to a vent so air can equalize the pressure and keep the seal intact. So when someone tells you the bend should point sideways, this is why. It is not a style choice. It is the shape that keeps the water where it belongs. As always, whether a specific older S-trap must be replaced depends on the code your local jurisdiction enforces, so verify locally before assuming.
Frequently Asked Questions
Is it the pipe shape or the water that blocks sewer gas?
The water. The curved shape exists only to hold a pool of water in place. That standing water is the seal that blocks gas. An empty trap, no matter how it is shaped, blocks nothing.
Why does my unused bathroom or floor drain smell?
The water in the trap most likely evaporated from disuse and left the drain open to the sewer. Running water into the fixture, or pouring water into a floor drain, refills the trap and usually clears the smell.
How much water is in a P-trap?
Model plumbing codes generally call for a trap seal of not less than 2 inches and not more than 4 inches of water depth. The exact requirement depends on the code your local jurisdiction has adopted.
Does a toilet have a P-trap?
A toilet has a trap, but it is built into the porcelain rather than added as a separate U-bend under the floor. The curved internal passage in the bowl holds the water seal.
Are S-traps still allowed?
Model plumbing codes generally prohibit S-traps in new installations because they tend to siphon themselves dry. Whether an existing one must be changed depends on local code.
This article is general information about how plumbing traps work and is not professional or safety advice. Plumbing requirements vary by jurisdiction, and any work that requires a permit or affects health and safety should be confirmed with a licensed plumber and your local code authority.
Sources
- International Code Council, 2024 International Plumbing Code, Section 1002.1 Fixture traps. https://codes.iccsafe.org/s/IPC2024P1/chapter-10-traps-interceptors-and-separators/IPC2024P1-Ch10-Sec1002.1
- New York City Administrative Code (adopting IPC), Section 1002.1 Fixture traps. https://codelibrary.amlegal.com/codes/newyorkcity/latest/NYCadmin/0-0-0-163234
- UpCodes, IPC Section 1002 Trap Requirements (trap seal depth and prohibited traps, including S-traps). https://up.codes/s/trap-requirements
- U.S. Occupational Safety and Health Administration, Hydrogen Sulfide (Overview and Hazards). https://www.osha.gov/hydrogen-sulfide
- U.S. Occupational Safety and Health Administration, Hydrogen Sulfide Hazards. https://www.osha.gov/hydrogen-sulfide/hazards