In terms of saving a person whom you have seen go beneath the surface, lung capacity is loosely based on these things:
Is it an adult or a child? The smaller the lungs, the less time they have before irreversible injury, or death, sets in.
Were they panicking? Sounds like a stupid question, but a great swimmer caught in a rip tide usually knows to stay calm. Panicking sucks up oxygen extremely fast.
What’s the water temperature? If its swimming weather, they’re screwed a hell of a lot quicker. If they feel through a sheet of ice on a lake in the middle of winter, the body uses up remaining oxygen almost by half (but figure for a third).
For a healthy adult, the window of opportunity closes between 4 and 5 minutes in normal temps. By 6 minutes, 99% of the time, we’re talking organ donor. For a child, cut it in half. Just because they are unconscious does not mean that they are hopelessly brain damaged, so hurry your ass up, already!! If you can reach them SAFELY, then use whatever is around you and help them. If you CANNOT be reasonably sure of your own safety, then absolutely do not proceed.