According to Genesis, the floodwaters prevailed over the earth for 150 days.
Genesis 7:24 gives this figure after describing the rising waters and the destruction of living things outside the ark. The statement concerns how long the waters remained dominant or high, not how long rain fell. Genesis 7:12 separately says that rain fell for forty days and forty nights.
Genesis 8 then describes the waters gradually receding. The ark is said to rest on the mountains of Ararat on the seventeenth day of the seventh month, while later dates mark the appearance of mountain tops and the eventual drying of the ground.
Because the narrative includes several chronological markers, summaries can incorrectly treat forty days and 150 days as competing totals. They refer to different phases: rainfall and the period during which the waters prevailed.