According to Genesis, the floodwaters prevailed over the earth for 150 days.
Genesis 7:24 gives the 150-day figure after describing the rising waters and the destruction of life outside the ark. The number refers to the period during which the waters remained dominant, not simply to the days of rainfall.
This is why the biblical account includes both forty days of rain and 150 days of prevailing waters. Genesis 8 then describes the waters gradually retreating, with the ark coming to rest on the mountains of Ararat in the seventh month.
Readers sometimes combine the figures or treat them as competing durations. They describe different phases in the narrative. The overall chronology continues until the ground is dry and Noah leaves the ark, which Genesis places much later than the first forty days.