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

***

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

# Function: ~~calculatePriceFromTotal()~~

> **calculatePriceFromTotal**(`price`, `taxPercent`?, `quantity`?): `number`

Calculates the price from the total price, taking into account the quantity and optional tax percentage.

## Parameters

• **price**: `number`

The price per unit.

• **taxPercent?**: `number`

The tax percentage (optional).

• **quantity?**: `number` = `DEFAULT_QUANTITY`

The quantity (default: DEFAULT_QUANTITY).

## Returns

`number`

The calculated price.

## Deprecated

use the new calculatePriceFromTotalWithTaxes

## Defined in

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