Menstrual Cycle Length Tracker Formula
Understand the math behind the menstrual cycle length tracker. Each variable explained with a worked example.
Formulas Used
Days Until Next Period
next_period_in = max(cycle_length - days_since_period, 0)Current Cycle Day
current_phase = days_since_periodOvulation Expected on Day
ovulation_day_display = ovulation_dayPMS Window Starts Day
pms_starts_day = cycle_length - 7Variables
| Variable | Description | Default |
|---|---|---|
cycle_length | Average Cycle Length(days) | 28 |
period_length | Period Duration(days) | 5 |
days_since_period | Days Since Last Period Started(days) | 15 |
ovulation_day | Derived value= cycle_length - 14 | calculated |
How It Works
Menstrual Cycle Phases
Typical 28-Day Cycle
Next Period = Cycle Length - Days Since Last Period Ovulation Day = Cycle Length - 14
Worked Example
A 28-day cycle, period lasts 5 days, currently on day 15.
- 01Next period in = 28 - 15 = 13 days
- 02Ovulation day = 28 - 14 = Day 14 (just passed)
- 03PMS window starts = Day 21 (in 6 days)
Frequently Asked Questions
What is a normal cycle length?
Normal cycles range from 21 to 35 days. The average is 28 days. Variation of a few days between cycles is normal.
When does PMS start?
PMS symptoms typically begin 7-10 days before the period (during the late luteal phase) and resolve once menstruation starts.
What causes irregular cycles?
Stress, weight changes, exercise, hormonal conditions, birth control, and perimenopause can all cause irregular cycles. Consult a doctor if cycles are consistently outside 21-35 days.
Ready to run the numbers?
Open Menstrual Cycle Length Tracker