> For the complete documentation index, see [llms.txt](https://docs.notionapps.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.notionapps.com/screens-and-components/formulas-and-rollups.md).

# Formulas & Rollups

Notion owns formula and rollup recipes. NotionApps can evaluate supported recipes from synced records so published apps are not limited to an incorrect or capped value returned by Notion’s page API.

### Use Recalculate in NotionApps

1. Open Builder → Databases.
2. Open Calculated properties.
3. Select a formula or rollup.
4. Read the Notion recipe, Status, and Depends on fields.
5. Leave Recalculate in NotionApps on when the switch is enabled.
6. Sync every database used by the recipe.
7. Publish and allow the background calculation to process.
8. Verify the result in the published app.

The toggle does not create or edit a formula. Change recipes in Notion, then Sync / Reload so NotionApps receives the new definition.

### Supported calculations

Formulas include property references, arithmetic, comparisons, if, and/or/not, empty, now, and dateBetween in supported units. Rollups include sum, count, average, min, and max.

Unsupported tokens such as formatDate, ifs, lets, style, map, filter, join, includes, length, and format continue to use Notion’s value. The toggle is disabled and the reason identifies the unsupported part.

### Formula and rollup states

| State                     | Meaning                                                            |
| ------------------------- | ------------------------------------------------------------------ |
| We’ll recalculate this    | Supported and selected for NotionApps evaluation.                  |
| Using Notion’s value      | Toggle is off.                                                     |
| Waiting on related fields | Required records or relation evidence are incomplete.              |
| Can’t recalculate         | Recipe is unsupported or incomplete; Notion remains authoritative. |

### More than 25 related pages

Notion’s page API can provide an incomplete relation leaf. For supported rollups, NotionApps uses synced related records rather than treating that capped leaf as the final answer. Every related database must be shared and synced, and relation loading must complete before the result can be trusted.

### Background processing

Recalculation is asynchronous. Queue and database-load safeguards can defer a record instead of running unsafe work immediately. Deferred work keeps its last good value. Unsupported formulas are not repeatedly forced through the evaluator, and duplicate producer signals are coalesced.

A successful Sync can create recalculation work, but Sync completion and calculation completion are separate events. Makers do not manually release blocked or quarantined records.

### Published screens

Lists, Details, Forms, and components show the selected value source. When a supported calculation completes, subsequent page fulfillment does not replace it with Notion’s stale leaf. When Recalculate is off or unsupported, Notion’s value remains visible.

### Troubleshooting

| Symptom                           | Action                                                                                                       |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| No Calculated properties section  | Add a formula/rollup in Notion, share database, sync.                                                        |
| Toggle disabled                   | Read unsupported/missing-recipe reason. Sync can load a recipe but cannot add unsupported language features. |
| Value remains old                 | Sync all dependencies, verify relation completeness, and allow background processing.                        |
| Rollup differs from Notion UI     | Confirm all related rows/databases are synced and the function is supported.                                 |
| Recipe changed but status did not | Sync / Reload, reopen Calculated properties.                                                                 |
| Preview differs from live app     | Publish and reload the live app.                                                                             |

### Related

* [Recalculate calculated properties](https://docs.notionapps.com/how-to-guides/recalculate-calculated-properties)
* [Reload and sync](https://docs.notionapps.com/databases/reload-and-sync)
* [Rollup troubleshooting](https://docs.notionapps.com/troubleshooting/why-are-my-rollups-on-notionapps-showing-zero-0-value-or-an-incorrect-value)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.notionapps.com/screens-and-components/formulas-and-rollups.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
