FRIDAY, Nov. 11, 2016 (HealthDay News) -- Scientists say they have figured out the ideal speeds for cyclists and pedestrians to move in order to limit their inhalation of air pollution and still get the full benefits of exercise.

"The faster you move, the harder you breathe and the more pollution you could potentially inhale, but you also are exposed to traffic for a shorter period of time. This analysis shows where the sweet spot is," study author Alex Bigazzi, a transportation expert at the University of British Columbia, said in a school news release.

The researchers used a computer model of 10,000 people. The investigators found that cyclists should ride between 7.5 to 12.4 miles per hour on city roads. And, pedestrians should walk between 1.2 and 3.7 miles per hour.

There are different recommended speeds depending on gender, age and road grades.

For example, on flat roads the ideal speeds are: 7.8 miles an hour for female cyclists and 8.3 miles an hour for male cyclists under 20. For cyclists aged 20 to 60, the ideal speed is 8 miles an hour for females and 9.3 miles an hour for males.

Female and male pedestrians under 20 should walk at around 1.9 miles per hour. Those aged 20 to 60 should walk at least 2.5 miles per hour, the study said.

Bigazzi said the good news is that these ideal numbers align closely with the speeds most people travel.

The study findings were published online recently in the International Journal of Sustainable Transportation.