# calculateAccountDebt

> **calculateAccountDebt**(`params`): `bigint`

Defined in: [packages/synapse-core/src/pay/account-debt.ts:13](https://github.com/FilOzone/synapse-sdk/blob/814fc2e242f2b236f8d2ba4078ebd703cedb5cf2/packages/synapse-core/src/pay/account-debt.ts#L13)

Compute account debt — the unsettled lockup amount exceeding available funds.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `params` | [`AccountState`](/reference/filoz/synapse-core/pay/type-aliases/accountstate/) | Raw account fields + current epoch |

## Returns

`bigint`

The debt amount (0n if account is healthy)