Ovulation happens about 14 days before your period starts. Let’s say your average menstrual cycle is 28 days, you ovulate around day 14, and your most fertile days are days 12, 13 and 14. If your average menstrual cycle is 35 days ovulation happens around day 21 and your most fertile days are days 19, 20 and 21.
Example: cycle length = 28 days (counted from the first day of one period to the first day of the next)