SuperPortal - Calculate Days on Market (DOM & CDOM)
What the numbers mean
- DOM (Days on Market) — how many days the current listing has been on the market. It resets if a home is taken off the market and later relisted.
- CDOM (Cumulative Days on Market) — the total days on the market across every time the home has been listed. It's the same as DOM if the home has only ever been listed once, and larger if it's been listed more than once.
The problem we solved
Our listing data comes from MLS feeds — Actris (Austin) and NTREIS (Waco). A feed only sends us an updated DOM/CDOM when something about the listing changes. Between those updates, the number sits frozen. So a home that's been actively for sale for months could keep showing "12 days" until the next update arrives.
Matrix (the MLS's own tool) always shows the right number because it recalculates every day. Our goal was to match Matrix by keeping our numbers live too.
How we keep the numbers live
In simple terms: we remember the number the feed gave us and the date it gave it. Then, each day, for homes that are still on the market, we add the days that have passed. When the feed sends a fresh update, we start again from that new number. A job runs every morning to refresh all on-market listings.
The two feeds behave differently, so we handle them differently.
Austin (Actris)
The feed gives us both DOM and CDOM directly. So we take the feed's number and add the days that have passed since it was last updated — for as long as the home is actively for sale. Once it goes off the market, the count stops and we keep the feed's final value.
Example: the feed reported 26 days back in early February. Today it shows 195 — the original 26 plus the days that have passed since.
Waco (NTREIS)
This feed is different: it never sends a DOM at all, and its cumulative number behaves differently. So we work the numbers out ourselves from the listing's dates:
- DOM = days between when the listing went on the market and today (while it's active), or the day it went off the market (once it's off).
- CDOM = the feed's cumulative figure, which also counts the home's earlier listings.
Special case — "Under Contract": when a Waco home goes under contract (a sale is agreed but not yet final), the feed stops counting its days — but Matrix keeps counting, because the home is still technically an active listing. So for these we keep counting up to today, to match what Matrix shows.
When does the clock stop?
- Still counting (live): Active listings — and in Waco, Under Contract listings too.
- Stopped (frozen): Pending, Closed, Expired, Withdrawn, and Hold. For these, the number is fixed at the point the home went off the market and never changes again.
Why our number can occasionally differ from Matrix by a day or two
We match Matrix in the large majority of cases. A few situations cause a small difference — usually 1 day, occasionally 2 — and only ever on DOM, never on the cumulative CDOM:
- Day-boundary rounding between what the feed stores and how Matrix counts.
- Delayed / "coming soon" listings: the MLS tells us the contract date, not the exact date the home became visible to buyers. If a home was listed a day or two before it actually went live, we may count those extra day(s); Matrix knows the true go-live date and the feed doesn't share it with us.
- Zero-day listings: if the MLS reports 0 cumulative days for a home, we show 0 — matching Matrix.
These come down to what the MLS feed does and doesn't give us. They're within our accepted tolerance: the numbers are correct to within a day or two, and cumulative totals match.
Not yet covered
The Florida (mfrmls) feed hasn't been reviewed for this yet, so it's unchanged for now.