How can I calculate no of sprints in period

HI Team,
I have a requirement that needs to count the sprint duration. If the sprint duration is 1 week how many sprints we have with duration one week.
If the sprint duration is 2 weeks how many sprints have duration with 2 weeks.

Can anyone help here?