@import url(‘https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,500;9..144,600;9..144,700&family=Inter:wght@400;500;600;700;800&display=swap’); .pc-pcc { –ink:#22302A; –ink-soft:#52645C; –ink-faint:#8A988F; –cream:#FBF7F0; –card:#FFFFFF; –sage:#5C7F62; –sage-dark:#3F5C45; –sage-pale:#E7EFE6; –clay:#C97B5A; –clay-dark:#A85D3D; –clay-pale:#F7E6DC; –gold:#C99A3F; –gold-dark:#9C7625; –gold-pale:#F7EFDC; –line:#E6E0D2; –accent-success:#4CAF50; –accent-warning:#FF9800; –radius:14px; –transition:all 0.25s cubic-bezier(0.2, 0.7, 0.3, 1); font-family:’Inter’,system-ui,-apple-system,’Segoe UI’,Roboto,sans-serif; color:var(–ink); background:var(–cream); line-height:1.65; font-size:16px; max-width:1020px; margin:0 auto; padding:0 16px 64px; -webkit-text-size-adjust:100%; } .pc-pcc * { box-sizing:border-box; } .pc-pcc img { max-width:100%; height:auto; display:block; } .pc-pcc h1, .pc-pcc h2, .pc-pcc h3, .pc-pcc h4 { font-family:’Fraunces’,serif; font-weight:600; color:var(–ink); line-height:1.22; margin:0 0 0.5em; } .pc-pcc h1 { font-size:clamp(28px,4.5vw,44px); font-weight:500; } .pc-pcc h2 { font-size:clamp(22px,3vw,29px); margin-top:2.4em; scroll-margin-top:24px; } .pc-pcc h2:first-of-type { margin-top:0; } .pc-pcc h3 { font-size:19px; margin-top:1.6em; } .pc-pcc p { margin:0 0 1em; } .pc-pcc a { color:var(–sage-dark); text-underline-offset:2px; transition:var(–transition); } .pc-pcc a:hover { color:var(–clay-dark); } .pc-pcc strong { color:var(–ink); font-weight:700; } .pc-pcc ul, .pc-pcc ol { padding-left:1.25em; margin:0 0 1.1em; } .pc-pcc li { margin-bottom:0.45em; } .pc-pcc :focus-visible { outline:2px solid var(–sage); outline-offset:2px; border-radius:4px; } .pc-pcc .eyebrow { display:inline-flex; align-items:center; gap:6px; font-size:12.5px; font-weight:700; letter-spacing:0.06em; text-transform:uppercase; color:var(–sage-dark); background:var(–sage-pale); padding:5px 12px; border-radius:99px; margin-bottom:14px; } .pc-pcc section { margin:3em 0; } .pc-pcc section:first-child { margin-top:0; } /* ===== HERO ===== */ .pc-hero { padding:40px 0 6px; } .pc-hero .lede { font-size:18px; color:var(–ink-soft); max-width:700px; } .pc-trust-bar { display:flex; flex-wrap:wrap; gap:8px; margin-top:18px; } .pc-trust-pill { display:inline-flex; align-items:center; gap:6px; font-size:13px; font-weight:600; color:var(–ink-soft); background:var(–card); border:1px solid var(–line); padding:6px 13px; border-radius:99px; } .pc-trust-pill svg { width:13px; height:13px; flex-shrink:0; color:var(–sage); } /* ===== CALCULATOR BOX ===== */ .pc-calc-container { background:linear-gradient(135deg, #E7EFE6, #FBF7F0); border:1px solid var(–sage-pale); border-radius:var(–radius); padding:clamp(20px,3.5vw,32px); margin:28px 0; box-shadow:0 2px 8px rgba(92,127,98,0.12); } .pc-calc-header { display:flex; align-items:center; gap:12px; margin-bottom:18px; } .pc-calc-icon { width:40px; height:40px; background:var(–sage); color:#fff; border-radius:10px; display:flex; align-items:center; justify-content:center; font-size:20px; flex-shrink:0; } .pc-calc-form { display:grid; grid-template-columns:1fr 1fr; gap:16px; } .pc-form-group { display:flex; flex-direction:column; } .pc-form-group label { font-size:14px; font-weight:600; color:var(–ink); margin-bottom:6px; display:block; } .pc-form-group input[type=”date”], .pc-form-group select { font-family:’Inter’,sans-serif; padding:11px 13px; border:1px solid var(–line); border-radius:9px; font-size:14px; color:var(–ink); background:#fff; transition:var(–transition); } .pc-form-group input[type=”date”]:focus, .pc-form-group select:focus { outline:none; border-color:var(–sage); box-shadow:0 0 0 3px rgba(92,127,98,0.1); } .pc-btn-calc { grid-column:1/-1; background:var(–sage); color:#fff; font-weight:700; padding:13px 20px; border:none; border-radius:9px; font-size:15.5px; cursor:pointer; transition:var(–transition); margin-top:2px; } .pc-btn-calc:hover { background:var(–sage-dark); transform:translateY(-1px); box-shadow:0 4px 12px rgba(92,127,98,0.25); } .pc-btn-calc:active { transform:translateY(0); } @media (max-width:680px) { .pc-calc-form { grid-template-columns:1fr; } .pc-btn-calc { grid-column:auto; } } /* ===== RESULTS DISPLAY ===== */ .pc-results { display:none; margin-top:24px; } .pc-results.show { display:block; animation:slideIn 0.4s ease; } @keyframes slideIn { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } } .pc-result-card { display:grid; grid-template-columns:repeat(auto-fit, minmax(140px, 1fr)); gap:12px; margin-bottom:20px; } .pc-stat { background:#fff; border:1px solid var(–line); border-radius:11px; padding:16px; text-align:center; } .pc-stat-number { font-family:’Fraunces’,serif; font-size:32px; font-weight:700; color:var(–sage); } .pc-stat-label { font-size:12px; text-transform:uppercase; letter-spacing:0.05em; color:var(–ink-faint); margin-top:4px; font-weight:600; } .pc-countdown-large { background:linear-gradient(135deg, var(–sage), var(–sage-dark)); color:#fff; border-radius:11px; padding:20px; text-align:center; grid-column:1/-1; } .pc-countdown-large .number { font-family:’Fraunces’,serif; font-size:clamp(32px,5vw,48px); font-weight:700; line-height:1; } .pc-countdown-large .label { font-size:13px; text-transform:uppercase; letter-spacing:0.05em; opacity:0.9; margin-top:6px; } .pc-message { background:var(–clay-pale); border:1px solid #ecd0bd; border-radius:9px; padding:14px 16px; font-size:14.5px; color:var(–ink); margin-top:16px; } .pc-message.success { background:rgba(76,175,80,0.1); border-color:rgba(76,175,80,0.3); } .pc-message.warning { background:rgba(255,152,0,0.1); border-color:rgba(255,152,0,0.3); } /* ===== QUICK ANSWER ===== */ .pc-quickbox { background:linear-gradient(135deg,var(–sage-dark),var(–sage)); color:#fff; border-radius:var(–radius); padding:24px 26px; margin:26px 0; box-shadow:0 4px 16px rgba(63,92,69,0.18); } .pc-quickbox h2 { color:#fff; font-size:15px; text-transform:uppercase; letter-spacing:0.06em; font-family:’Inter’,sans-serif; font-weight:700; margin-bottom:10px; opacity:0.92; } .pc-quickbox p { color:#fff; font-size:16.5px; margin-bottom:14px; } .pc-quickbox .pc-btn-link { display:inline-flex; align-items:center; gap:7px; background:#fff; color:var(–sage-dark); font-weight:700; font-size:14.5px; padding:10px 18px; border-radius:9px; text-decoration:none; transition:transform 0.12s ease; } .pc-quickbox .pc-btn-link:hover { transform:translateY(-1px); } /* ===== WEEKLY MILESTONES ===== */ .pc-milestones { margin:20px 0; } .pc-milestone { background:#fff; border-left:3px solid var(–sage); border-radius:9px; padding:16px; margin-bottom:12px; transition:var(–transition); } .pc-milestone:hover { box-shadow:0 2px 8px rgba(92,127,98,0.1); } .pc-milestone-head { display:flex; align-items:baseline; gap:8px; margin-bottom:6px; } .pc-milestone-week { font-family:’Fraunces’,serif; font-size:17px; font-weight:600; color:var(–sage-dark); } .pc-milestone-date { font-size:13px; color:var(–ink-faint); } .pc-milestone-event { font-size:14.5px; color:var(–ink-soft); margin:0; } /* ===== INFOGRAPHIC WRAPS ===== */ .pc-figure { margin:20px 0 10px; background:#fff; border:1px solid var(–line); border-radius:var(–radius); padding:22px 18px 18px; } .pc-fig-eyebrow { font-size:12px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(–ink-faint); margin-bottom:4px; } .pc-figure h3 { margin:0 0 6px; margin-top:0; } .pc-fig-sub { color:var(–ink-soft); font-size:14px; margin-bottom:14px; } .pc-figure svg { width:100%; height:auto; display:block; } .pc-legend { display:flex; gap:16px; flex-wrap:wrap; margin-top:14px; font-size:12.5px; color:var(–ink-soft); } .pc-legend span { display:inline-flex; align-items:center; gap:6px; } .pc-legend i { width:11px; height:11px; border-radius:3px; display:inline-block; flex-shrink:0; } .pc-bar-fill { transform:scaleX(0); transform-origin:left center; transition:transform 0.9s cubic-bezier(0.2,0.7,0.3,1) 0.2s; } .pc-pcc.in-view .pc-bar-fill { transform:scaleX(1); } /* ===== INFO CARDS ===== */ .pc-card { background:#fff; border:1px solid var(–line); border-radius:var(–radius); padding:22px 24px; margin:18px 0; } .pc-card-sm { background:#fff; border:1px solid var(–line); border-radius:11px; padding:18px 20px; } .pc-grid2 { display:grid; grid-template-columns:1fr 1fr; gap:18px; } .pc-grid3 { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; } @media (max-width:760px) { .pc-grid2, .pc-grid3 { grid-template-columns:1fr; } } /* ===== CTA CARD ===== */ .pc-cta-card { display:flex; align-items:center; gap:18px; background:var(–clay-pale); border:1px solid #ecd0bd; border-radius:var(–radius); padding:20px 22px; margin:22px 0; flex-wrap:wrap; } .pc-cta-icon { width:46px; height:46px; flex-shrink:0; background:var(–clay); color:#fff; border-radius:11px; display:flex; align-items:center; justify-content:center; font-size:22px; } .pc-cta-text { flex:1 1 260px; } .pc-cta-text h3 { margin:0 0 4px; font-size:17px; } .pc-cta-text p { margin:0; font-size:14px; color:var(–ink-soft); } .pc-btn { flex-shrink:0; background:var(–clay); color:#fff; font-weight:700; font-size:14.5px; padding:12px 20px; border-radius:9px; text-decoration:none; white-space:nowrap; transition:var(–transition); border:none; cursor:pointer; } .pc-btn:hover { background:var(–clay-dark); } /* ===== SIGNS & SYMPTOMS ===== */ .pc-signs-grid { display:grid; grid-template-columns:repeat(auto-fit, minmax(160px, 1fr)); gap:12px; } .pc-sign { background:#fff; border:1px solid var(–line); border-radius:11px; padding:14px; text-align:center; } .pc-sign-icon { font-size:24px; margin-bottom:6px; } .pc-sign-label { font-size:13.5px; font-weight:600; color:var(–ink); margin:0; } .pc-sign-desc { font-size:12px; color:var(–ink-soft); margin:4px 0 0; } /* ===== FAQ & CALLOUTS ===== */ .pc-faq-item { border-bottom:1px solid var(–line); } .pc-faq-item:last-child { border-bottom:none; } .pc-faq-q { width:100%; text-align:left; background:none; border:none; padding:16px 4px; font-family:’Fraunces’,serif; font-size:16.5px; font-weight:600; color:var(–ink); cursor:pointer; display:flex; justify-content:space-between; align-items:center; gap:12px; } .pc-faq-q .x { font-size:20px; color:var(–sage); transition:transform 0.2s; flex-shrink:0; } .pc-faq-q[aria-expanded=”true”] .x { transform:rotate(45deg); } .pc-faq-a { padding:0 4px 16px; color:var(–ink-soft); display:none; font-size:15px; } .pc-faq-a.open { display:block; } .pc-callout { font-size:13.5px; color:var(–ink-soft); margin-top:14px; padding:12px 15px; border-radius:8px; border-left:3px solid var(–clay); background:var(–clay-pale); } .pc-callout.info { border-left-color:var(–sage); background:var(–sage-pale); } .pc-callout strong { color:var(–ink); } /* ===== AUTHOR E-E-A-T BOX ===== */ .pc-author { display:flex; gap:16px; align-items:flex-start; background:#fff; border:1px solid var(–line); border-radius:var(–radius); padding:22px; margin-top:8px; } .pc-author img { width:64px; height:64px; border-radius:50%; object-fit:cover; flex-shrink:0; background:var(–sage-pale); } .pc-author .name { font-family:’Fraunces’,serif; font-weight:600; font-size:16.5px; } .pc-author .role { color:var(–sage-dark); font-size:13.5px; font-weight:600; margin:2px 0 8px; } .pc-author .bio { font-size:14px; color:var(–ink-soft); margin-bottom:6px; } .pc-author .bio a { font-weight:600; } .pc-meta-row { display:flex; flex-wrap:wrap; gap:7px 14px; font-size:12.5px; color:var(–ink-faint); margin-top:18px; padding-top:14px; border-top:1px solid var(–line); } /* ===== RELATED TOOLS ===== */ .pc-related-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:14px; } .pc-related-card { display:block; background:#fff; border:1px solid var(–line); border-radius:11px; padding:16px 18px; text-decoration:none; transition:var(–transition); } .pc-related-card:hover { border-color:var(–sage); transform:translateY(-2px); } .pc-related-card .tag { font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:0.05em; color:var(–sage-dark); } .pc-related-card h4 { margin:6px 0 4px; color:var(–ink); font-size:15px; } .pc-related-card p { margin:0; font-size:13px; color:var(–ink-soft); } @media (max-width:760px) { .pc-related-grid { grid-template-columns:1fr; } } /* ===== RESPONSIVE ===== */ @media (prefers-reduced-motion:reduce) { .pc-pcc * { transition:none !important; animation:none !important; } .pc-bar-fill { transform:scaleX(1) !important; } }
Interactive Calculator · Medically Reviewed

Pregnancy Countdown Calculator

Enter your due date or LMP to see exactly how many weeks and days you have left, plus weekly development milestones, labor signs to watch for, and a day-by-day countdown to your due date.

✓ Medically reviewed ✓ ACOG compliant ✓ Real-time updates ✓ Instant results
📅

Calculate Your Countdown

Enter your due date or last menstrual period

28 days (standard) 26 days 27 days 29 days 30 days 31 days 35 days
0
Days until due date
0
Weeks
0
Days
0%
Complete
0w
You are now

What to expect

Your countdown starts at 40 weeks (280 days) from your last menstrual period. The due date marks the midpoint of your “full term” window—most babies arrive between 37 and 42 weeks, though exactly on your due date happens for only about 1 in 20. Use this calculator to track key milestones, fetal development stages, and prepare for the signs that labor is approaching.

Read the full due date guide →

Fetal Development: What’s Happening Now

As your pregnancy progresses, your baby is growing rapidly and developing critical systems. Here’s a week-by-week snapshot of the major milestones ahead:

Infographic

Weeks of Pregnancy: Development Timeline

Major fetal milestones from weeks 4 through delivery
Fetal Development Progression Weeks 4–8: Embryonic period Weeks 9–20: Rapid growth & organ development Weeks 21–28: Viability milestone & brain development Weeks 29–36: Continued growth & positioning Weeks 37–42: Full term & labor readiness

Weeks 4–8

Heart begins beating, neural tube forms, brain and spinal cord development begins. Baby is about the size of a blueberry.

Weeks 9–20

All major organs are forming. Facial features become distinct, fingers and toes appear. Quickening (fetal movement) may be felt around week 16–20.

Weeks 21–28

Baby is viable (able to survive outside the womb with medical support). Rapid brain development and weight gain accelerate. Eyes open around week 26–27.

Weeks 29–36

Continued rapid growth. Baby practices breathing movements. Lungs continue maturing. Baby begins moving into head-down position for birth.

Weeks 37–38

Early term. Baby is fully formed. Immune system antibodies transferred from mother. Growth slows as baby prepares for birth.

Weeks 39–42

Full term. Baby is about 7–8 lbs, 19–21 inches. All systems ready. Labor can begin anytime. Induction typically offered by week 42.

Signs Labor Is Approaching

In the weeks before your due date, watch for these signs that your body is preparing for labor. Not all will occur, and not all need to happen at once:

🔽

Lightening

Baby drops into the pelvis; you can breathe easier but pressure increases on bladder.

💧

Show

Mucus plug releases; pinkish or bloody discharge may appear.

🌊

Rupture of Membranes

Amniotic fluid leaks or gushes; contact your provider immediately.

💪

Contractions

Regular, rhythmic tightening of the uterus. True labor contractions increase in frequency and intensity.

🎯

Cervical Effacement

Cervix thins and softens (detected during cervical exam by provider).

📊

Dilation

Cervix begins to open from 0 to 10 cm (verified by provider).

When to call your provider: Contact your maternity team immediately if you experience rupture of membranes, active vaginal bleeding, severe abdominal pain, or any concerning symptoms. Don’t wait—always err on the side of caution.

Getting Ready: Trimester-by-Trimester Checklist

Use your countdown to stay on track with essential preparations:

✓

By Weeks 20–28 (Second Trimester)

Schedule glucose screening, finalize pediatrician choice, start maternity leave paperwork, begin childbirth classes.

✓

By Weeks 30–36 (Third Trimester Start)

Install and test your car seat, pre-register at your hospital, finalize your birth plan, pack your hospital bag.

✓

By Weeks 37–40 (Full Term)

Review labor signs and when to call. Arrange leave coverage. Stay within 30 minutes of your hospital. Rest and prepare mentally.

Frequently Asked Questions

LMP (last menstrual period) dating counts 280 days from the first day of your period. Due-date dating uses a calculated date that may be adjusted based on ultrasound confirmation. If your LMP is known and regular, both methods usually align. The calculator adjusts for cycle length automatically.
Your due date may shift slightly if an early ultrasound (weeks 8–13) differs from your LMP calculation by more than 5–7 days. Once set, ACOG guidance recommends keeping the date fixed for the rest of pregnancy. Later ultrasounds monitor growth, not dating.
Reaching your due date is normal—about 1 in 5 babies arrive before, and a similar share arrive after. Your provider will likely schedule additional monitoring (non-stress tests, amniotic fluid checks) and discuss induction options if you haven’t delivered by week 41.
If your cycle is irregular or unknown, your due date should be based on a first-trimester ultrasound (weeks 8–13) rather than LMP alone. Always use the date your doctor or midwife confirms, as they have access to your full medical history and imaging.
Yes. The countdown counts all days (weekends, holidays, etc.) from today until your due date, giving you the most accurate picture of time remaining. Your provider’s office will also be counting the same way.
Twin pregnancies typically deliver around week 37–38 (not week 40), as the risk of complications rises sooner with multiple babies. Your doctor will give you a specific due date for your situation. Use this calculator as a general reference, but follow your provider’s guidance.

Related Tools & Guides

Dr. Ruqaiya Khan, MD, FACOG — Medical Reviewer
Medically reviewed by Dr. Ruqaiya Khan, MD, FACOG
Board-Certified Obstetrician–Gynecologist

Dr. Khan reviews all pregnancy, labor, and fetal development content on PregCalc.com for clinical accuracy against current ACOG, NHS, and CDC guidance. View full credentials →

Last updated: June 2026 · Evidence-based: ACOG, NHS, CDC, Mayo Clinic · Reviewed quarterly
{ “@context”: “https://schema.org”, “@graph”: [ { “@type”: “MedicalWebPage”, “@id”: “https://pregcalc.com/pregnancy-countdown-calculator#webpage”, “url”: “https://pregcalc.com/pregnancy-countdown-calculator/”, “name”: “Pregnancy Countdown Calculator | Track Weeks & Days Until Due Date”, “headline”: “Pregnancy Countdown Calculator”, “description”: “Interactive pregnancy countdown calculator. Enter your due date or LMP to track weeks remaining, weekly development milestones, labor signs, and countdown to delivery. Medically reviewed.”, “inLanguage”: “en-US”, “datePublished”: “2026-06-25”, “dateModified”: “2026-06-25”, “lastReviewed”: “2026-06-25”, “reviewedBy”: {“@id”: “https://pregcalc.com/about/dr-ruqaiya-khan#person”}, “author”: {“@id”: “https://pregcalc.com/about/dr-ruqaiya-khan#person”}, “medicalAudience”: {“@type”: “MedicalAudience”, “audienceType”: “Patient”}, “about”: {“@type”: “MedicalCondition”, “name”: “Pregnancy”}, “specialty”: “Obstetrics”, “mainContentOfPage”: {“@type”: “WebPageElement”, “cssSelector”: “.pc-pcc”}, “publisher”: {“@type”: “Organization”, “name”: “PregCalc”, “url”: “https://pregcalc.com”} }, { “@type”: “FAQPage”, “mainEntity”: [ {“@type”: “Question”, “name”: “What’s the difference between LMP dating and due-date dating?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “LMP dating counts 280 days from the first day of your period. Due-date dating uses a calculated date that may be adjusted based on ultrasound confirmation.”}}, {“@type”: “Question”, “name”: “Can my countdown number change?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Your due date may shift slightly if an early ultrasound differs from your LMP calculation. Once set, the date is typically fixed for the rest of pregnancy.”}}, {“@type”: “Question”, “name”: “What if my countdown reaches zero?”, “acceptedAnswer”: {“@type”: “Answer”, “text”: “Reaching your due date is normal. Your provider will schedule additional monitoring and discuss induction if you haven’t delivered by week 41.”}} ] }, { “@type”: “BreadcrumbList”, “itemListElement”: [ {“@type”: “ListItem”, “position”: 1, “name”: “Home”, “item”: “https://pregcalc.com”}, {“@type”: “ListItem”, “position”: 2, “name”: “Calculators”, “item”: “https://pregcalc.com/calculators”}, {“@type”: “ListItem”, “position”: 3, “name”: “Pregnancy Countdown”, “item”: “https://pregcalc.com/pregnancy-countdown-calculator”} ] }, { “@type”: “Person”, “@id”: “https://pregcalc.com/about/dr-ruqaiya-khan#person”, “name”: “Dr. Ruqaiya Khan”, “jobTitle”: “Obstetrician-Gynecologist”, “honorificSuffix”: “MD, FACOG”, “url”: “https://pregcalc.com/about/dr-ruqaiya-khan” } ] } (function() { const form = document.getElementById(‘countdownForm’); const dueDateInput = document.getElementById(‘dueDateInput’); const cycleInput = document.getElementById(‘cycleInput’); const resultsContainer = document.getElementById(‘resultsContainer’); const root = document.getElementById(‘pregnancy-countdown-calculator’); if (!form) return; // Set today as default const today = new Date(); dueDateInput.valueAsDate = today; form.addEventListener(‘submit’, function(e) { e.preventDefault(); calculateCountdown(); }); function calculateCountdown() { const dueDateStr = dueDateInput.value; const cycleLength = parseInt(cycleInput.value) || 28; if (!dueDateStr) return; const dueDate = new Date(dueDateStr + ‘T00:00:00’); const today = new Date(); today.setHours(0, 0, 0, 0); const timeDiff = dueDate – today; const daysRemaining = Math.ceil(timeDiff / (1000 * 60 * 60 * 24)); // LMP date (40 weeks before due date) const lmpDate = new Date(dueDate); lmpDate.setDate(lmpDate.getDate() – 280); // Gestational age const gestationalDays = Math.floor((today – lmpDate) / (1000 * 60 * 60 * 24)); const gestationalWeeks = Math.floor(gestationalDays / 7); const gestationalDaysRemaining = gestationalDays % 7; const totalDays = 280; const percentComplete = Math.round((gestationalDays / totalDays) * 100); // Display results document.getElementById(‘daysRemaining’).textContent = Math.max(0, daysRemaining); document.getElementById(‘weeksDisplay’).textContent = Math.floor(Math.max(0, daysRemaining) / 7); document.getElementById(‘daysDisplay’).textContent = Math.max(0, daysRemaining) % 7; document.getElementById(‘percentComplete’).textContent = Math.min(100, percentComplete) + ‘%’; document.getElementById(‘gestAge’).textContent = Math.min(42, gestationalWeeks) + ‘w ‘ + gestationalDaysRemaining + ‘d’; // Message const messageContainer = document.getElementById(‘messageContainer’); let message = ”; if (daysRemaining < 0) { message = '
Your due date has passed. If you have not delivered, contact your healthcare provider immediately for monitoring and next steps.
‘; } else if (daysRemaining === 0) { message = ‘
Today is your due date! Labor can begin anytime. Watch for labor signs and stay in contact with your provider.
‘; } else if (daysRemaining <= 7) { message = '
You are in your final week! Watch for labor signs: contractions, show, rupture of membranes. Have your bag ready and know when to call your provider.
‘; } else if (daysRemaining <= 14) { message = '
Labor could start anytime now. Make sure you know the signs of labor and when to contact your provider. Keep your hospital bag accessible.
‘; } else if (gestationalWeeks < 37) { message = '
You are in the preterm period. If you experience signs of preterm labor (regular contractions, bleeding, fluid leakage, severe pain), contact your provider immediately.
‘; } messageContainer.innerHTML = message; // Milestones const milestonesContainer = document.getElementById(‘milestonesContainer’); const milestones = generateMilestones(gestationalWeeks, daysRemaining, lmpDate); let milestonesHTML = ‘

Upcoming Milestones

‘; milestones.forEach(m => { milestonesHTML += `
${m.week} ${m.date}

${m.event}

`; }); milestonesHTML += ‘
‘; milestonesContainer.innerHTML = milestonesHTML; // Intersection observer for animations if (‘IntersectionObserver’ in window) { const io = new IntersectionObserver(entries => { entries.forEach(entry => { if (entry.isIntersecting) { root.classList.add(‘in-view’); } }); }, {threshold: 0.3}); io.observe(resultsContainer); } else { root.classList.add(‘in-view’); } resultsContainer.classList.add(‘show’); resultsContainer.scrollIntoView({behavior: ‘smooth’, block: ‘nearest’}); } function generateMilestones(currentWeek, daysRemaining, lmpDate) { const milestones = []; const daysPerWeek = 7; const maxWeeks = 42; for (let w = Math.max(currentWeek + 1, 37); w <= maxWeeks; w++) { const daysUntilWeek = (w – currentWeek) * daysPerWeek – (new Date().getHours() / 24); if (daysUntilWeek = 37 && w = 38 && w = 39 && w = 40 && w = 41) event = ‘⚠️ Late term — increased monitoring by your provider’; if (event) { milestones.push({week: `Week ${w}`, date: dateStr, event}); } if (milestones.length >= 5) break; } return milestones; } // FAQ Accordion document.querySelectorAll(‘.pc-faq-q’).forEach(btn => { btn.addEventListener(‘click’, function() { const isOpen = this.getAttribute(‘aria-expanded’) === ‘true’; this.setAttribute(‘aria-expanded’, String(!isOpen)); this.nextElementSibling.classList.toggle(‘open’, !isOpen); }); }); })();

Our pregnancy countdown calculator uses your due date to show exactly how many days, weeks, and trimesters remain, helping you plan ahead with confidence. For more on how due dates are estimated, see the ACOG guide on pregnancy dating, or pair this tool with our Due Date Calculator for a full timeline of your pregnancy.