> ## Documentation Index
> Fetch the complete documentation index at: https://kk-83bff226.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# factorial

> Calculates the factorial of a given number.

## Signature

```typescript path=null start=null theme={null}
factorial(num: number): number
```

## Parameters

* **num**: `number` - The number to calculate the factorial of.

## Returns

`number` - The factorial of the input number.

## Source

Defined in [number.ts:129](https://github.com/koji/ichigyou/blob/main/src/number.ts#L129)
