[**@bondsports/general**](../README.md) • **Docs**

***

[@bondsports/general](../globals.md) / calculateTotalPriceByPrices

# Function: calculateTotalPriceByPrices()

> **calculateTotalPriceByPrices**(`prices`, `startPrice`): `number`

Calculates the total price by summing up the prices in the given array.

## Parameters

• **prices**: `number`[]

An array of prices.

• **startPrice**: `number` = `0`

The starting price for the calculation. Defaults to 0.

## Returns

`number`

The total price.

## Defined in

[utils/price.util.ts:453](https://github.com/Bond-Sports/bondUtils/blob/545f16ceb055481acfd7641d7809c0f252d3a5e6/packages/general/src/utils/price.util.ts#L453)
