In Genesis, the Floodwater prevailed over the Earth for 150 days before it began to recede. Genesis 7:24 states that the waters prevailed for 150 days, and Genesis 8:3 then says they began to abate.
This duration is distinct from the 40 days and 40 nights of rain. The rain period describes the downpour, while the 150-day figure describes how long the waters remained dominant. Genesis uses several separate time markers, so combining them into one duration produces an inaccurate summary.
The following account tracks the reduction of the waters, the Ark’s resting on the mountains of Ararat, and Noah’s later release of birds. The passage does not describe the entire time Noah spent inside the Ark with this one number; it gives a specific stage in the Flood chronology. That distinction explains why both 40 and 150 appear in discussions of the story.