Ducks lay eggs for several years, usually longer than chickens. The exact age when they stop laying, however, varies, mostly depending on the breed of the duck.
Like humans, ducks hatch with a set amount of ova—several thousand. Chickens have been found to have sometimes 12,000 or more egg follicles. They will never use all of these, as they reach “eggopause” before they’ve exhausted their entire supply.
A duck’s highest egg production is always during their first year of laying. After that, production gradually tapers down.
How fast the ducks deplete their egg supply influences how soon they stop laying. Ducks that lay large numbers of eggs per year, such as the Khaki Campbell, which can lay 300+ eggs a year, will stop laying sooner than ducks that lay less per year, such as the Cayuga.
Ducks that are given artificial light to push them to lay more eggs and extend the laying season will lay more in a year, but they will also wear out faster and stop for good sooner.
However, in general, you can expect good egg production for 3-5 years, and your ducks will likely stop laying entirely when they are 7-9 years old.
Occasionally, a duck will lay for ten years or perhaps more. Ducks usually stop laying a few years before they die of old age, and they typically live 8-12 years, sometimes 15 years or more.
Muscovies, which have long lifespans for a duck, also tend to lay for longer, possibly for up to twelve years. In my experience, my Muscovies seem to stop laying when they’re seven or eight years old. I have a 7-year-old Muscovy who is probably laying less than 20 eggs a year, and a 9-year-old who is no longer laying.