diff --git a/index.html b/index.html
index 0262407..43909dc 100644
--- a/index.html
+++ b/index.html
@@ -725,27 +725,25 @@ function getPhaseSequence(effectiveStart) {
}
function estimateMonths(phases) {
- let total = 0;
+ let totalDays = 0;
for (const k of phases) {
if (k === '3xL7') break;
- total += HYBRIDS[k].months;
+ totalDays += HYBRIDS[k].cycles * HYBRIDS[k].daysPer;
}
- return Math.round(total * 10) / 10;
+ return Math.round(totalDays / 30.4 * 10) / 10;
}
function estimateYear1Cum(phases, commPct, giftLevel) {
let cum = 0;
- let months = 0;
+ let daysLeft = 365;
for (const k of phases) {
if (k === '3xL7') break;
const p = HYBRIDS[k];
const yourCut = p.payout * (commPct / 100);
- const cycInMonth = p.months / (p.daysPer / 30.4);
- const cyclesInYear1 = Math.min(p.cycles, Math.max(0, (12 - months) / (p.months / p.cycles)));
- const actual = Math.floor(cyclesInYear1);
- for (let i = 0; i < actual; i++) cum += yourCut;
- months += p.months;
- if (months >= 12) break;
+ const cyclesFit = Math.min(p.cycles, Math.floor(daysLeft / p.daysPer));
+ cum += cyclesFit * yourCut;
+ daysLeft -= cyclesFit * p.daysPer;
+ if (daysLeft <= 0) break;
}
return Math.round(cum);
}