Women who want to prevent weight gain as they get older need to ride a bicycle or walk briskly every day rather than just strolling, a study from Harvard University found.

Women who were ages 25 to 42 at the start of the research gained less weight if they spent an additional 30 minutes a day riding bikes or walking 3 miles an hour or faster by the end of the study. Those who increased only slow walking didn’t reduce their weight gain over the 16-year study, according to the report published Monday in the Archives of Internal Medicine.

In the United States, about 66 percent of adults are overweight or obese, while 16 percent of children are overweight, according to the researchers. The findings help clarify how much exercise is needed to slow weight gain as people age and the results also apply to men, said co-lead author Rania Mekary.

“We want to give practical solutions to people to lessen their weight gain,” said Mekary, a research associate at the Harvard School of Public Health in Boston. “Even small steps can make a difference. It’s never too late.”

The researchers in the study looked at 18,414 premenopausal women who didn’t have chronic diseases and were part of the Brigham and Women’s Hospital Nurses’ Health Study II starting in 1989. Participants were questioned about their medical history, lifestyle and health-related behaviors every two years.

Over the 16-year study, the women overall gained an average of 20.5 pounds. Anyone who stayed within 5 percent of their original weight was classified as having no weight gain.

Women in the study gained about 3.5 pounds less if they increased their time riding a bike by 30 minutes a day compared with those who didn’t increase their riding time over the study, the researchers found. The participants weren’t asked about biking intensity so it’s unclear at what speed they were riding.

Those who increased the amount of time they walked briskly at 3 miles an hour or faster by a half hour daily gained about 4 pounds less, the study showed.

Normal-weight women who rode their bike more than four hours a week, regardless of their exercise level in 1989, were 26 percent less likely to gain more than five percent of their initial body weight, the researchers found. Overweight and obese women who rode their bike two to three hours a week were 46 percent less likely to gain more than five percent of their initial body weight.

Even increasing the amount of time spent exercising by a little bit can make a difference in preventing weight gain, Mekary said.