# FACT
URL: https://docs.valsight.ai/fact/
Description: This example computes the factorial of each value in the input node.
**Category:** [Math & numeric](/math-numeric/)

## Overview

The **FACT** function **returns the factorial of a number**. The factorial of a number is equal to 1×2×3×...×number.

Use this function when you need to compute the factorial of node values, for example in combinatorial calculations or probability models.

## Syntax

`FACT('Node')`

## Parameters

| Parameter | Description                                       | Type           | Required |
| --------- | ------------------------------------------------- | -------------- | -------- |
| **Node**  | An input node with values to calculate factorial. | Node reference | Yes      |

## Watch out

* Factorial cannot be computed on **negative numbers**.
* The input cannot contain **numbers larger than 20**.
* Any **decimal number** will be rounded to the smallest value, e.g. 3.725 → 3.

## Example

### Factorial of integer values

This example computes the factorial of each value in the input node.

**Input node:** `'Node'`

| Year | Value |
| ---- | ----- |
| 2025 | 0     |
| 2026 | 3     |
| 2027 | 5     |
| 2028 | 7     |

**Formula:** `FACT('Node')`

| Year | FACT Result |
| ---- | ----------- |
| 2025 | 1           |
| 2026 | 6           |
| 2027 | 120         |
| 2028 | 5040        |
