In the biblical Flood narrative, the waters prevailed over the earth for 150 days. Genesis 7:24 gives this duration after describing the rising waters and the destruction caused by the Flood.
The 150-day figure is distinct from the 40 days and 40 nights of rain. Genesis uses both numbers for different parts of the chronology: the rain lasts 40 days and nights, while the waters continue prevailing for 150 days. This is why answers based only on the famous rain duration do not fit this question.
Genesis 8 then describes the waters gradually receding. The Ark comes to rest on the mountains of Ararat, and Noah later tests the conditions with a raven and doves. The full sequence from the beginning of the Flood to Noah’s departure from the Ark extends much longer than either 40 or 150 days.
The number is sometimes associated with a simplified retelling, but its specific biblical context is the period during which the waters prevailed over the earth.