# Pipes and Cisterns — Inlets, Outlets, Leaks and Pipes Taking Turns

Source: https://skills101.in/learn/aptitude/aptitude-pipes-and-cisterns — Skills101 free tutorial (Quantitative Aptitude). Updated 2026-11-21.

A **cistern** is a water tank. An **inlet** pipe fills it; an **outlet** pipe (or a **leak**) empties it. Pipes and cisterns questions are time-and-work questions in disguise: filling the tank is the "work", and a pipe that empties is a worker who **undoes** work.

The time-and-work lesson introduced the idea. This lesson goes deeper, with the question types TCS, Infosys, Wipro and AMCAT keep repeating.

## 1. The units (LCM) method

Fractions like 1/12 + 1/15 − 1/20 are slow and easy to get wrong. Instead:

1. Take the tank's capacity as the **LCM** of all the given times (in "units").
2. Find each pipe's units per hour: capacity ÷ its time. Make it **negative** for a pipe that empties.
3. Add the rates of the pipes that are open. Time = units left ÷ combined rate.

**Why it works.** The real size of the tank does not matter, only the rates compared with it. Choosing the LCM makes every rate a whole number.

### Example 1 (all pipes open)
*Pipe A fills a tank in 12 hours, pipe B fills it in 15 hours, and pipe C empties the full tank in 20 hours. If all three are opened together on an empty tank, how long does it take to fill?*

![A tank of 60 units: A adds 5 units an hour, B adds 4, C removes 3; together 6 units an hour, so the tank fills in 10 hours](https://skills101.in/learn-img/aptitude/pipes-lcm.svg)

LCM(12, 15, 20) = 60 units. A = +5, B = +4, C = −3 per hour. Together = 6 units per hour. Time = 60 ÷ 6 = **10 hours**.

## 2. Leaks

A leak is just an outlet pipe you did not open on purpose.

### Example 2
*A pipe fills a tank in 6 hours. Because of a leak at the bottom, it takes 8 hours. How long would the leak take to empty the full tank?*

LCM(6, 8) = 24 units. Pipe alone = 4 units/hour. Pipe with leak = 3 units/hour. So the leak removes 4 − 3 = 1 unit/hour. Full tank = 24 units → **24 hours**.

**Shortcut:** leak time = (a × b)/(b − a) = (6 × 8)/(8 − 6) = 24, where a is the normal time and b the time with the leak. It is the same calculation written as one formula.

## 3. A pipe closed (or opened) midway

Work out the units done in the first part, then finish the rest with whoever is still working.

### Example 3
*Pipes A and B can fill a tank in 20 and 30 minutes. Both are opened together, and A is closed after 5 minutes. How long does B take to fill the rest?*

LCM(20, 30) = 60 units. A = 3/min, B = 2/min. In 5 minutes together: 5 × 5 = 25 units. Left = 35 units. B alone: 35 ÷ 2 = **17.5 minutes** (total time 22.5 minutes).

### Example 4 (when to close a pipe)
*A and B can fill a tank in 12 and 18 minutes. Both are opened, and B is closed after some time so that the tank is full in exactly 10 minutes. When was B closed?*

LCM(12, 18) = 36 units. A = 3/min, B = 2/min. A works all 10 minutes: 30 units. B must give the other 6 units → 6 ÷ 2 = 3 minutes. **B was closed after 3 minutes.**

## 4. Pipes that take turns

When pipes are opened one at a time in a fixed order, find what one full **cycle** does, run whole cycles, and then finish carefully hour by hour.

### Example 5 (TCS NQT style)
*Pipes A and B fill a tank in 6 and 9 hours. They are opened alternately for one hour each, starting with A. When is the tank full?*

LCM(6, 9) = 18 units. A = 3/hour, B = 2/hour. One 2-hour cycle = 5 units.

![Bars of the tank level hour by hour as A and B take turns: 3, 5, 8, 10, 13, 15 and then 18 units after hour 7, when the tank is full](https://skills101.in/learn-img/aptitude/alternate-fill.svg)

After 3 cycles (6 hours): 15 units. Left = 3 units, and it is A's turn. A adds 3 units in exactly 1 hour. **Full after 7 hours.**

Starting with B instead: after 6 hours there are again 15 units, but now it is B's turn. B adds 2 (7 hours, 17 units), then A needs 1 unit, which takes 1/3 hour. Total = **7 hours 20 minutes**. The order matters.

### The trap with an emptying pipe

*A fills a tank in 3 hours, B empties it in 4 hours. They are opened alternately for an hour each, starting with A. When is the tank full?*

LCM = 12 units. A = +4, B = −3. Each cycle adds just 1 unit. The quick answer "12 cycles = 24 hours" is **wrong**: the tank becomes full during an A-hour before that.

After 8 cycles (16 hours) the tank holds 8 units. In hour 17, A adds 4 → 12 units, full. **Answer: 17 hours.** Rule: stop as soon as a filling hour **reaches** the top; don't let the emptying pipe "pull it back" in your calculation.

## 5. Tank capacity in litres

When a rate is given in litres, convert the unit idea into real litres.

### Example 6
*A leak can empty a full tank in 6 hours. An inlet pipe that fills 4 litres a minute is opened, and now the full tank empties in 8 hours. What is the capacity of the tank?*

Inlet = 4 × 60 = 240 litres/hour. Let the capacity be C litres. Leak = C/6 per hour. Net emptying = C/6 − 240 = C/8. So C(1/6 − 1/8) = 240 → C/24 = 240 → **C = 5,760 litres**.

## 6. Pairs of pipes

### Example 7
*A and B together fill a tank in 6 hours, B and C in 10 hours, and A and C in 7.5 hours. How long would each take alone?*

LCM-friendly capacity: 30 units. A + B = 5, B + C = 3, A + C = 4 units/hour. Add all three: 2(A + B + C) = 12 → A + B + C = 6 units/hour (all three together: 30 ÷ 6 = 5 hours).

A = 6 − 3 = 3 → **10 hours**. B = 6 − 4 = 2 → **15 hours**. C = 6 − 5 = 1 → **30 hours**.

## Common mistakes

- Adding an emptying pipe's rate instead of subtracting it.
- In alternate-pipe questions with an outlet, counting whole cycles past the moment the tank is already full.
- Forgetting the time already spent when the question asks for the **total** time.
- Mixing minutes and hours, or litres per minute with tank times in hours.
- Thinking a leak "takes longer" to fill: a leak never fills; it only slows the filling.

## Quick recap

- Capacity = LCM of times. Rate = capacity ÷ time; outlets are negative.
- Time = units still needed ÷ combined rate of open pipes.
- Leak time = ab/(b − a), where a = normal time, b = time with the leak.
- Taking turns: whole cycles first, then finish hour by hour; check whether a filling hour tops it up early.
- Pairs given: add all pairs, halve to get all three, then subtract.


Practice quiz and free certificate: https://skills101.in/learn/aptitude/aptitude-pipes-and-cisterns