--- title: "Use the MONTHDIF Function to Calculate Number of Months Between Dates" slug: "monthdif-function" description: "Learn to calculate time intervals with MONTHDIF by finding the number of months between two Dates." tags: ["MONTHDIF", "functions ", "formula syntax", "Pigment Boards", "Pigment Blocks", "Modeling and Formulas"] updated: 2025-05-30T09:43:42Z published: 2025-08-22T11:59:25Z canonical: "kb.pigment.com/monthdif-function" --- > ## Documentation Index > Fetch the complete documentation index at: https://kb.pigment.com/llms.txt > Use this file to discover all available pages before exploring further. # MONTHDIF function ## Description Returns the number of months between two Dates. ## Syntax `MONTHDIF(Start Date, End Date)` ## Arguments | Argument | Type | Dimensions | Description | | --- | --- | --- | --- | | *Start Date* (required) | Date | Any Dimensions | | | *End Date* (required) | Date | No Dimension or Dimensions of *Date From* | | ## Returns | Type | Dimensions | | --- | --- | | Integer | Dimensions of argument *Start Date* | ## Examples | Formula | Result | Description | | --- | --- | --- | | `MONTHDIF(DATE(2020, 01, 01), DATE(2020, 01, 31))` | 0 | There is a 0 month difference between January 1st 2020 and January 31st 2020. | | `MONTHDIF(DATE(2020, 01, 31), DATE(2020, 02, 01))` | 1 | There is a 1 month difference between January 31st 2020 and February 1st 2020. | | `MONTHDIF(DATE(2020, 01, 1), DATE(2021, 01, 01))` | 12 | There is a 12 months difference between January 1st 2020 and January 1st 2021. | ## See also Related articles: [EDATE](/v1/docs/edate-function), [MONTH](/v1/docs/month-function) , [EOMONTH](/v1/docs/eomonth-function) > [!TIP] > More of a hands-on learner? > > Talk to your Customer Success Manager about downloading the Functions and Modifiers in Pigment Application into your workspace. It includes examples of every formula and modifier in Pigment!