> ## Documentation Index
> Fetch the complete documentation index at: https://docs.runway.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Revenue recognition

> Generally accepted accounting principles (GAAP)  require that businesses recognize revenue when it’s earned (accrual accounting) rather than when payment is received (cash accounting). This article explains how to build a revenue recognition model in Runway for recurring contracts. 

## Step 1: Prepare your integrations and databases

First, connect the data sources you plan to use model revenue recognition. Runway has [CRM](https://docs.runway.com/integrations/revenue/hubspot), [data warehouse](https://docs.runway.com/integrations/data-storage/data-warehouses#data-warehouses), and [google sheet ](https://docs.runway.com/integrations/data-storage/google-sheets)integrations available.

You can also manually copy data into a Runway database. You will need to follow [database configuration directions](https://docs.runway.com/concepts/databases/databases-basics#configuring-a-database).

The Runway team can help you write a query that will bring in the fields that you will need for revenue recognition modeling from your integration source.

Typically, for a revenue recognition model the contract or deal databases are segmented by a unique ID and Customer Name, depending on the fields your business uses to track contracts.

The following items brought into Runway as number and date drivers are standard for a revenue recognition model:

* Contract Amount
* Contract Term length
* Contract Start Date
* Contract End Date

Note the example of a simple contract database below:

* Contract ID and Customer Name dimensions are set as Segments
* Contract Start Date, Contract Value and Contract Term (Months) are Drivers
* Payment Cadence is an Other column, meaning it is metadata tied to each Contract ID and Customer Name segment

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/CleanShot2025-05-14at12.28.47@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=cae3a3c60466a8ecff52fdd6066d0f1d" alt="Contract Data Pn" width="1656" height="632" data-path="CleanShot2025-05-14at12.28.47@2x.png" />

## Step 2: Set up contract start date,  end date and term length

To recognize revenue over the length of a contract, you will need Start Date, Contract Term and Contract End Date drivers.

### Calculate contract end date using start date and term (months)

1. Add a date driver column by clicking the + at the right hand side of the database and selecting date driver

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/CleanShot2025-05-14at12.53.55@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=81da5236cc435125285d7310867e7f96" alt="Addingdatedriver Pn" width="1722" height="482" data-path="CleanShot2025-05-14at12.53.55@2x.png" />
2. Name the date driver **Contract End Date**
3. Click on the driver column name and select `Add Default Formula`. Default formulas allow you to set a formula for every segment of the driver.
4. Use `DateAdd()` to calculate the Contract End Date based on Contract Start Date and Contract Term Length.

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at13.04.10@2x(2).png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=2e57110d5d7fee4da76313fcf41e5297" alt="CleanShot 2025-05-14 at 13.04.10@2x (2).png" width="1126" height="260" data-path="images/CleanShot2025-05-14at13.04.10@2x(2).png" />

   <Note>
     Note that the units must be wrapped in single-quotes, e.g. months as 'm'
   </Note>

   <video muted autoplay="true" loop controls playsinline="true" class="doc-video" src="https://documentation.runwaydev.com/videos/Date-Add-Demo.mp4" />

### Calculate contract term (months) from contract start date and end date

1. Add a **number driver column** by clicking the `+`  at the right hand side of the database and selecting **number driver**

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/CleanShot2025-05-14at13.41.32@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=1a0dca3c67b8a28c7b9af4c598b64878" alt="Addingnumberdriver Pn" width="1748" height="510" data-path="CleanShot2025-05-14at13.41.32@2x.png" />
2. Edit the name for the **number driver column**
3. Clicking on the driver column name, select **Add Default Formula** to set a formula for every segment of data (in this example, a formula for Contract Term Length will be propagated to each intersection of Contract ID and Customer Name)
4. Use `DateDiff()` function to calculate a Contract Term Length based on contract start date and Contract End Date.

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at14.19.09@2x(2).png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=d3afa356c7b706f9124e0503c88adf21" alt="Clean Shot2025 05 14at14 19 09@2x(2) Pn" width="1118" height="254" data-path="images/CleanShot2025-05-14at14.19.09@2x(2).png" />

   <video muted autoplay="true" loop controls playsinline="true" class="doc-video" src="https://documentation.runwaydev.com/videos/Date-diff-demo.mp4" />

## Step 3: Build logic to recognize revenue over length of contract

Here’s how to create a formula that will spread your revenue over the period that services get delivered.

1. Add a **number driver column** to the database by clicking the `+`  to the right of the last database column.

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/CleanShot2025-05-14at13.41.32@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=1a0dca3c67b8a28c7b9af4c598b64878" alt="Addingnumberdriver Pn" width="1748" height="510" data-path="CleanShot2025-05-14at13.41.32@2x.png" />

2. Name this driver **Monthly Recognized Revenue**.
3. Click into the driver name and select `Add default formula `to open the default formula editor for the driver column.
4. Begin typing Contract Value to surface the Contract Value driver.
5. You will see two options to reference the Contract Value driver.
   * A **database column reference** with the naming convention `Database Name.Driver Column`.
     * This option gives you the affordance to apply date filters and filters for dimensions you have not set as database Segments. For revenue recognition purposes, you will want to choose the database reference option so you have access to date filters.
   * **Direct Driver reference** option, which appears as Contract Value *This Segment.*
     * This option offers cleaner name format and the ability to filter based on database **segments.**

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at20.23.49@2x(1).png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=5c6114172510b273019941907a152458" alt="CleanShot 2025-05-14 at 20.23.49@2x (1).png" width="2530" height="490" data-path="images/CleanShot2025-05-14at20.23.49@2x(1).png" />

6. Click the driver pill to open the formula editor options.
7. Click \*\*+ Add Rule \*\*to add **filters to the formula**. These will make sure the contract value hits your model only between Contract start and End dates.
   * Set **Contract Start Date.Month** `is on or before` **This month**
   * Set **Contract End Date.Month** `is after` **This month**
   * **Segment**`is`**This Segment** will ensure the rules you set get applied across all segments of the driver, which in this example, means across all slices of `Contract ID` x `Customer Name`. You can review how to \*\*create dynamic formulas \*\*using *This Segment* [here](https://docs.runway.com/concepts/databases/formulas-in-databases#example%3A-dynamic-default-formula-using-this-segment)

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.07.41@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=e2b8806325f94c2bd2fed892552e2050" alt="Clean Shot2025 05 14at21 07 41@2x Pn" width="998" height="552" data-path="images/CleanShot2025-05-14at21.07.41@2x.png" />

8. Finally, divide by` Contract Term Length (Months)` to calculate a monthly value. Each driver will be populated from Contract Start to Contract End date.

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.04.19@2x(1).png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=88e1f04c516ee75e2ce6df310144fbf7" alt="CleanShot 2025-05-14 at 21.04.19@2x (1).png" width="1002" height="318" data-path="images/CleanShot2025-05-14at21.04.19@2x(1).png" />

<Check>
  To check if the formula is calculating correctly, select all months of values and check whether count and sum in the calculation preview match the Contract Term Length and Contract Value

  <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/Check-sumavg.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=ef05484b35c2552b0ce8705511fa0d9e" alt="Check-sumavg.png" width="3350" height="430" data-path="images/Check-sumavg.png" />
</Check>

## Step 4: Drive revenue forecast formulas by referencing Contracts data

Finally, you will need to **wire up the Contract database** to **drive Revenue forecasts** upstream in your model. This is the last step required to ensure that your topline is actively driven by the `Monthly Revenue Recognition `driver you've built.

1. Navigate to a `Revenue` driver if it already exists in your Runway instance **or** create a new driver in a [Model](https://docs.runway.com/concepts/models/models-basics) or on a [Page](https://docs.runway.com/concepts/pages/pages-basics)
2. **Click into the forecast formula** of the driver and type `sum()`

   * You can create a` sum()` two ways:
     * Using a **driver reference** that directly references **Monthly Recognized Revenue** `All Customer Names All Contract IDs`

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.23.36@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=6777766ee5e70290b52b15043f1505d2" alt="CleanShot 2025-05-14 at 21.23.36@2x.png" title="CleanShot 2025-05-14 at 21.23.36@2x.png" style={{ width:"100%" }} width="1880" height="594" data-path="images/CleanShot2025-05-14at21.23.36@2x.png" />

   <img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.27.25@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=92b7d4db8a8a77075409e2561d317f10" alt="CleanShot 2025-05-14 at 21.27.25@2x.png" title="CleanShot 2025-05-14 at 21.27.25@2x.png" style={{ width:"100%" }} width="938" height="216" data-path="images/CleanShot2025-05-14at21.27.25@2x.png" />

   * You may also create a sum over the\*\*database column reference \*\* which gives you the affordance to **apply filters** based on non-Segment dimensions

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.28.30@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=2be3dcbca4a8d8d7de0efcbe04d79cd1" alt="CleanShot 2025-05-14 at 21.28.30@2x.png" title="CleanShot 2025-05-14 at 21.28.30@2x.png" style={{ width:"90%" }} className="mx-auto" width="908" height="350" data-path="images/CleanShot2025-05-14at21.28.30@2x.png" />

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-14at21.28.36@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=823578b0433a210b7f26948f4e3ea265" alt="CleanShot 2025-05-14 at 21.28.36@2x.png" className="mx-auto" style={{ width:"86%" }} width="684" height="190" data-path="images/CleanShot2025-05-14at21.28.36@2x.png" />

3. **Click the carat** to the left of the Revenue driver to drill into inputs in-line
   * This lets us quickly check that `Monthly Recognized Revenue` drivers for each `Customer x Contract ID `segment pull into the aggregation as expected
   * Based on the drill-in, you will be able to see whether `Monthly Recognized Revenue` values begin and end on the correct dates
   * Each `Monthly Recognized Revenue` driver has a Runway arrow that will open up a [detail pane](https://docs.runway.com/concepts/drivers/driver-details-pane#details-pane) that will let you investigate the drivers formulas, inputs and Plans

<img src="https://mintcdn.com/runway-5055a12e/qkmZoKL31yU_hnvb/images/CleanShot2025-05-15at03.58.13@2x.png?fit=max&auto=format&n=qkmZoKL31yU_hnvb&q=85&s=0a886d474817b187d685e00953275c82" alt="CleanShot 2025-05-15 at 03.58.13@2x.png" width="2244" height="528" data-path="images/CleanShot2025-05-15at03.58.13@2x.png" />
