A compartment is a portion of the space within a ship defined vertically between decks and horizontally between bulkheads. It is analogous to a room within a building, and may provide watertight subdivision of the ship's hull important in retaining buoyancy if the hull is damaged. Subdivision of a ship's hull into watertight compartments is called compartmentation.
Watertight subdivision limits loss of buoyancy and freeboard in the event of damage, and may protect vital machinery from flooding. Most ships have some pumping capacity to remove accumulated water from the bilges, but a steel ship with no watertight subdivision will sink if water accumulates faster than pumps can remove it. Standards of watertight subdivision assume no dewatering capability, although pumps kept in working order may provide an additional measure of safety in the event of minor leaks. The most common watertight subdivision is accomplished with transverse bulkheads dividing the elongated hull into a number of watertight floodable lengths. Early watertight subdivision tested with hoses sometimes failed to withstand the hydrostatic pressure of an adjoining flooded compartment. Effective watertight subdivision requires these transverse bulkheads to be both watertight and structurally sound.
A ship will sink if the transverse bulkheads are so far apart that flooding a single compartment would consume all the ship's reserve buoyancy. Aside from the possible protection of machinery, or areas most susceptible to damage, such a ship would be no better than a ship without watertight subdivision, and is called a one-compartment ship. A ship capable of remaining afloat when any single watertight compartment is flooded is called a two-compartment ship, but damage destroying the tightness of a transverse bulkhead may cause flooding of two compartments and loss of the ship. A ship able to remain afloat with any two compartments flooded is called a three-compartment ship, and will withstand damage to one transverse bulkhead.
After the Titanic sinking, safety standards recommended spacing transverse bulkheads so no single point of damage would either submerge the end of the upper bulkhead deck or reduce bulkhead deck freeboard to less than 3 inches (7.6 cm). Wartime experience with torpedo damage indicated the typical damage diameter of 35 feet (11 m) defined a practical minimum distance for transverse bulkhead spacing.