Promotion Overlap Calculator logo

Promotion Overlap Calculator

by XS AMSAFIS DATASETS, S.L.WebsiteUpdated Nov 25, 2026

Calculates the real, non-overlapping duration of commercial offers from a list of date ranges — automatically resolves overlaps (e.g. flash sales cutting into longer promotions) without requiring pre-sorted data.

promotions
retail
trade-promotion
+7
|

How to pay

Subscribe

Monthly billing

$5/month

Predictable monthly cost with included usage. Best for steady, high-volume traffic.

  • Unlimited tools within plan limits
  • One API key, billed once a month
  • Cancel any time

What it does

Given a list of commercial offers (or any date-ranged events) for the same product, this tool calculates the real number of days each offer was actually in effect — correctly handling overlaps.

A common real-world case: a 10-day promotion is interrupted by a 1-day "Only Today" flash offer. The flash offer wins that single day; the original promotion's real duration drops to 9 days. With several offers overlapping in different, nested ways, working this out by hand becomes error-prone fast — this tool resolves it deterministically, however many offers are involved.

Input format

A CSV (or raw CSV text) with exactly three required columns, in any order:

  • event_start — offer start date
  • event_end — offer end date
  • id — groups offers belonging to the same product. Can be any identifier you choose (a hash or internal code works fine) — it doesn't need to reveal what the product actually is.

The tool takes one argument, csv_content: the full text of your CSV file, header row included.

Any additional columns (price, campaign name, etc.) are ignored and not used in the calculation. Uploaded files are kept as received for up to 40 days for billing verification, then deleted.

Rows don't need to be pre-sorted; the tool sorts internally and returns results in the same row order they were submitted.

Robustness

  • Separator (, or ;) is auto-detected.
  • Date format is auto-detected: YYYY-MM-DD (recommended, unambiguous), MM-DD-YYYY, or DD-MM-YYYY.
  • Clear, explicit errors if required columns are missing or if a row has event_end earlier than event_start.

Output

A CSV with the three required columns (id, event_start, event_end, in that order) plus duration: the real, overlap-free number of days that offer was in effect. Any extra columns you sent are not returned. Rows come back in the order you submitted them, using the same separator and date format as your input file.

Via MCP, this CSV is returned as text inside the tool result; save it as a .csv file if you need a file.

Note on same-day conflicts

If two offers for the same product start on the exact same date, which one takes priority for that day is resolved automatically but arbitrarily — avoid ambiguity by giving offers distinct start dates whenever possible.

Try it before you subscribe

Worked examples with diagrams, and a free 20,000-row sample (no signup, no API key), are on the product site:

See the Docs tab for worked examples with visual diagrams.

How will you use Promotion Overlap Calculator?

In an AI agent

Claude, Codex, Cursor, VS Code… Choose →

From the terminal

mcpize CLI, pipelines, Skills. Choose →

In your code

TypeScript, Python, cURL. Choose →