# QuantityXRate

The `QuantityXRate` calculation type is typically used to calculate mileage reimbursement where the number of miles and the rate per mile are used.

When you create a `QuantityXRate` action, you must specify a quantity and a rate.

You can also specify an annual cap, that is, the maximum amount that can be applied over the course of a year. The cap can be based on the calendar year or the fiscal year.

## Calculation formulas

The `QuantityXRate` calculation type uses these formulas depending on whether the spreading is used.

``Period value = Quantity x Rate x Phasing factor for this period x Proration factor for this period``

If spreading is not used, the period that contains the action start date gets the entire amount without proration:

``Period value = Quantity x Rate``

## Example 1: QuantityXRate calculation with spreading

This example shows the `QuantityXRate` calculation for a position with these settings:

• Phasing method: Even

For each period, the phasing factor is 1/12.

• This table shows the quantity, rate, and the start and end dates for this action:
Start date End date Quantity Rate
2/8/17 6/15/17 1,200 \$1

This table shows the calculated values for each period from February through June:

Month Period value Result
Feb (1,200 x \$1) x 1/12 x 21/28 \$75
Mar (1,200 x \$1) x 1/12 x 31/31 \$100
Apr (1,200 x \$1) x 1/12 x 30/30 \$100
May (1,200 x \$1) x 1/12 x 31/31 \$100
Jun (1,200 x \$1) x 1/12 x 15/30 \$50

## Example 2: QuantityXRate calculation without spreading

This example shows the `QuantityXRate` calculation for a position with these settings:

This table shows the result of the `QuantityXRate` action without spreading: