> For the complete documentation index, see [llms.txt](https://developer.firmhouse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developer.firmhouse.com/sdks/firmhouse-sdk/reference/functions/calculate-cart-totals.md).

# Function: calculateCartTotals()

```ts
function calculateCartTotals(cart): FirmhouseCartTotals;
```

Calculate cart subtotals, promotion discounts, and totals.

Active promotions do not stack: when multiple promotions are present, the largest discount is used. Shipping is not included.

## Parameters

### cart

`Pick`<[`FirmhouseCart`](/sdks/firmhouse-sdk/reference/interfaces/firmhouse-cart.md), | `"amountForStartingSubscriptionCents"` | `"monthlyAmountCents"` | `"appliedPromotions"`>

## Returns

[`FirmhouseCartTotals`](/sdks/firmhouse-sdk/reference/interfaces/firmhouse-cart-totals.md)
