JSON, CSV, XML, YAML: Data Formats Compared
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
The average menstrual cycle is 28 days — except it isn't. Studies show that only about 13% of cycles are exactly 28 days. Normal cycles range from 21 to 35 days, and even the same person's cycle can vary by several days month to month. So how do period trackers and ovulation calculators predict what's coming next?
Every cycle moves through four distinct phases, driven by shifting hormone levels:
| Phase | Typical days | What happens |
|---|---|---|
| Menstruation | Days 1–5 | Uterine lining sheds (your period) |
| Follicular | Days 1–13 | Follicles develop; estrogen rises |
| Ovulation | Day 14 (approx) | Mature egg released from ovary |
| Luteal | Days 15–28 | Progesterone rises; lining thickens |
The follicular phase (before ovulation) is the variable one — it can be shorter or longer. The luteal phase is remarkably consistent at about 14 days for most people. This is the key insight behind all cycle prediction algorithms.
Since the luteal phase is roughly 14 days, calculators estimate ovulation by counting backward from your expected next period:
Estimated ovulation day = next expected period - 14 days
Example: 30-day cycle, last period started March 1
Next period expected: March 31
Estimated ovulation: March 31 - 14 = March 17An egg survives only 12–24 hours after ovulation. But sperm can survive in the reproductive tract for up to 5 days. This creates a roughly 6-day fertile window: the 5 days before ovulation plus the day of ovulation itself.
Most due date calculators use Naegele's rule, published in 1812 and still the standard today:
Due date = Last Menstrual Period (LMP) + 280 days
Or equivalently:
Due date = LMP + 9 months + 7 days
Example: LMP = January 1, 2026
Due date = January 1 + 280 days = October 8, 2026The 280-day figure assumes ovulation occurred on day 14 of a 28-day cycle. For longer or shorter cycles, some calculators adjust by adding the difference:
Only about 4% of babies are born on their estimated due date. The actual delivery window spans roughly 37 to 42 weeks. First-time pregnancies tend to go slightly longer. Due dates are best understood as the center of a probable delivery range, not a scheduled event.
Several factors influence cycle regularity:
Cycle tracking apps build predictions from your personal history, but biology isn't a clock. The more cycles you log, the better predictions become — but they remain estimates rooted in averages, not certainties.
Why we need structured data formats, how JSON, CSV, XML, and YAML differ, and when to choose each one.
IPv4 vs IPv6, public vs private addresses, how geolocation databases map IPs to locations, and how VPNs change your visible IP.
Simple vs compound interest, the Rule of 72, how compounding frequency matters, and why APY and APR are not the same thing.