> ## Content Index
> Fetch the complete content index at: https://notionsolutions.net/llms.txt
> Use this file to discover other available public pages before exploring further.

# Notion Date Difference Formula: Days Between Two Dates
- URL: https://notionsolutions.net/notion-formula-date-diff/
- Published: 2026-10-30T10:17:38.000Z
- Updated: 2026-10-30T10:17:40.000Z
- Description: Keep the source dates and calculate their gap in a separate Formula property. Choose the right order, unit, and counting rule before interpreting the number.
- Author: Kevin Turner
- Tags: guide, databases

Use `dateBetween(prop("End Date"), prop("Start Date"), "days")` to calculate the day difference between two Notion Date properties. Put the end date first for a positive start-to-end interval. Keep both source fields, and add the calculation as a separate Formula property so you can inspect the dates when a result surprises you.

Notion's [dateBetween reference](https://www.notion.com/help/formula-syntax?ref=notionsolutions.net) documents the units and shows that reversing the dates reverses the sign. For an educational date-only example, January 14 to March 3, 2024 is **49 elapsed days**. Counting both endpoint dates would answer a different question.

## Calculate the gap between two Date properties

Start in a database where you can add or edit properties. Notion’s [Can edit content permission](https://www.notion.com/help/sharing-and-permissions?ref=notionsolutions.net#access-levels) allows changes to pages and property values, but not to the database’s structure or properties. If the property controls are unavailable, work with the database owner before changing the setup.

Use two properties with the **Date** type, named `Start Date` and `End Date`. A text field that looks like a date is still text. I would start with actual Date properties rather than adding text parsing to a simple duration calculation.

If the input fields do not exist, add each through **Edit properties → New property** and choose **Date**. The same [property-management controls](https://www.notion.com/help/database-properties?ref=notionsolutions.net) let you inspect an existing field before reusing it. Keep the following three roles separate:

__Source fields and calculated output__
| Property     | Type    | What you enter                                 |
| ------------ | ------- | ---------------------------------------------- |
| Start Date   | Date    | The interval’s starting date                   |
| End Date     | Date    | The interval’s ending date                     |
| Days between | Formula | The expression below; the number is calculated |

1. At the top of the database, select the slider icon.
2. Choose **Edit properties → New property → Formula**.
3. Name the property **Days between**, then select **Edit formula**.
4. Enter the formula below, using the exact names of your two Date properties.

If your inputs are named `Kickoff` and `Completed`, replace `"Start Date"` and `"End Date"` in both the guard and the calculation. The editor’s properties list shows available fields. Adapt the expression to your database rather than renaming live fields just to match this example.

[![Start Date and End Date are Date inputs; Days between is a separate Formula property created through Edit properties](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-property-setup.webp)](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-property-setup.webp?ref=notionsolutions.net)

Keep the two source dates available and put the calculation in its own Formula property.

The [documented formula setup path](https://www.notion.com/help/formulas?ref=notionsolutions.net#create-a-formula) adds a calculated field alongside your existing properties. This version checks for missing inputs before calculating:

```notion
if(
  or(empty(prop("Start Date")), empty(prop("End Date"))),
  empty(),
  dateBetween(prop("End Date"), prop("Start Date"), "days")
)
```

Read the last line as **End Date minus Start Date, measured in days**. The surrounding `if` returns an empty value when either input is missing. Notion documents [checking date inputs with if and returning empty() before a date operation](https://www.notion.com/help/common-formula-errors?ref=notionsolutions.net); `or` makes either missing date sufficient to skip this calculation.

Open the formula editor from a database row to use its [live preview for that row](https://www.notion.com/help/formulas?ref=notionsolutions.net#edit-a-formula). Check a row whose dates you understand, rather than judging the formula from a database full of unknown or incomplete values.

## Interpret positive, negative, zero, and empty results

The following are educational arithmetic cases for the guarded formula above, with date-only inputs.

__Reading the date-only difference__
| Start Date       | End Date         | Result | Meaning                                                                  |
| ---------------- | ---------------- | ------ | ------------------------------------------------------------------------ |
| January 14, 2024 | March 3, 2024    | 49     | The end is 49 days after the start.                                      |
| March 3, 2024    | January 14, 2024 | −49    | The end precedes the start; check whether that ordering was intentional. |
| January 14, 2024 | January 14, 2024 | 0      | The dates have no elapsed-day gap.                                       |
| January 14, 2024 | Empty            | Empty  | The guard skips a row with a missing input.                              |

The 49-day example includes February 29 because 2024 is a leap year: January 14 to February 14 contributes 31 days, and February 14 to March 3 contributes 18\. The source dates stay intact; the Formula property carries the calculated gap.

A zero is a valid difference. Keep the empty checks on the *input dates*, as shown, rather than wrapping the final number in `empty(...)`. In Notion, [the empty function treats 0 as empty](https://www.notion.com/help/formula-syntax?ref=notionsolutions.net), so a check on the calculated number could mistake a legitimate zero for a missing result.

A negative value can reveal an incorrect start or end date. I would investigate that ordering before forcing every result positive: hiding the sign makes a backwards project interval harder to notice.

For your first check, use a separate example row so you do not have to erase a real project’s dates. Enter the same date in both Date fields with **Include time** off, then open this row’s formula editor: the date-only gap should be zero. Leave one input empty in another example row to check the guard.

__Turn a surprising result into a specific check__
| Observation                 | Discriminating check                                                                   | Action and expected change                                                                                                                                                      |
| --------------------------- | -------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Blank result                | Does either Date input have no value?                                                  | Populate the missing input only when the date is known. With both inputs present, the guarded expression takes its calculation branch; a missing date deliberately stays blank. |
| Unexpected negative number  | Inspect the actual start/end values and the order of the arguments.                    | Correct a mistaken date or property reference. Keep End first and Start second for a positive forward interval; preserve negative values when the ordering is intentional.      |
| Same-date row appears blank | Did a modified formula check empty on the calculated number?                           | Return the empty checks to the inputs. Zero should remain a valid result when both date-only inputs are equal.                                                                  |
| Editor reports an error     | Compare the names, Date types, quoted "days" unit and parentheses with the expression. | Repair the mismatched name, type or syntax before interpreting a number. A date-looking string needs a type decision, not an arithmetic adjustment.                             |

[![Equal date-only inputs preserve zero; a missing start or end returns empty; reversed January 14 and March 3 dates give a negative gap](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-guard-cases.webp)](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-guard-cases.webp?ref=notionsolutions.net)

Check the input dates for missing values; zero is a valid difference when both dates are equal.

## If the dates live in one Date range

You do not need separate properties when your database already uses one range. In a Date property named `Dates`, open the date picker and enable **End date** to enter both endpoints. Notion's [Date-property instructions describe the End date option](https://www.notion.com/help/database-properties?ref=notionsolutions.net).

For that structure, use `dateStart` and `dateEnd` to extract the endpoints:

```notion
if(
  empty(prop("Dates")),
  empty(),
  dateBetween(dateEnd(prop("Dates")), dateStart(prop("Dates")), "days")
)
```

Notion's [current range examples use dateEnd first and dateStart second](https://www.notion.com/help/formula-syntax?ref=notionsolutions.net) for a positive duration. Older tutorials may use `end()` and `start()`; follow the current function names. Enter a real end date when you mean a multi-day interval, and compare both endpoints in the row preview.

[![One Dates range supplies dateEnd as the first argument and dateStart as the second argument, with days as the unit](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-range-inputs.webp)](https://storage.ghost.io/c/5c/30/5c30c46b-86a3-4d20-984f-4f6ae8ad1ed2/content/images/2026/10/date-diff-range-inputs.webp?ref=notionsolutions.net)

A range uses two endpoints from the same property: end first, start second.

Choose the source structure that suits your database. Separate fields make distinct start and completion dates easy to inspect; a range keeps one planned period together. Both can feed a separate calculated gap.

## Choose the unit and counting rule

The [official unit list](https://www.notion.com/help/formula-syntax?ref=notionsolutions.net) is `"years"`, `"quarters"`, `"months"`, `"weeks"`, `"days"`, `"hours"`, and `"minutes"`. Change the quoted unit in the formula to the one you need. Use the lowercase, plural spelling shown in the reference.

For a project measured in days, keep `"days"`. For a timed event, `"hours"` or `"minutes"` can make the interval easier to interpret. Do not replace calendar months with an assumed 30 days: months vary in length, and a month-based question is different from a total-day count.

Decide what the number should mean before changing the formula. A date-only interval from January 14 to March 3, 2024 has 49 elapsed days. A calendar-date count that includes both endpoints has 50 dates. Adding one is appropriate only for that explicit inclusive rule with an ordered, date-only interval; it is not a general repair for a surprising result. The formula above also counts weekends—it does not calculate business days or exclude holidays.

If your properties include times, inspect them before interpreting a day result. [Notion's Date picker](https://www.notion.com/help/database-properties?ref=notionsolutions.net) has **Include time** and **Date format & timezone** controls. Two calendar dates alone do not describe the whole interval when their timestamps differ. For a result that appears one day short, follow the focused [dateBetween counting and timestamp checks](https://notionsolutions.net/notion-datebetween-off-by-one/) before adding a correction.

## Calculate days until a deadline

For a countdown, replace the starting input with the current date. Use `today()` for the current date without a time, or `now()` when the current time matters; [Notion documents that distinction](https://www.notion.com/help/formula-syntax?ref=notionsolutions.net). A date-only countdown using a Date property named `Due Date` is:

```notion
if(
  empty(prop("Due Date")),
  empty(),
  dateBetween(prop("Due Date"), today(), "days")
)
```

With date-only inputs, a positive number means the deadline is ahead, zero means it is today, and a negative number means it is in the past. This is a changing countdown, whereas Start Date to End Date is a fixed interval for unchanged inputs. Keep separate Formula properties if you need both.

If the editor reports an error, check property names, Date types, missing values, parentheses, and the quoted unit first. If one input is actually a formatted string, relation, or rollup list, use the [date formula type checks](https://notionsolutions.net/notion-formula-date-errors/) to identify what the function is receiving. Fix the source type before changing the arithmetic.