> For the complete documentation index, see [llms.txt](https://docs.does.qa/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.does.qa/test-steps/data/calculate-value.md).

# Calculate Value

Calculate Value takes an input, applies a mathematical operation, and stores the result in the [Value Store](/values/value-store.md). Use it when a later step needs a computed number or string.

![Calculate value Test Step](https://app.does.qa/screenshots/node/data_process_calculate.png)

## When to use it

* Add, subtract, multiply, or divide Values before a form submit.
* Round, floor, or ceil a numeric Value for display checks.
* Chain with [Alias value](/test-steps/data/alias-value.md) when the same result needs a second name in the Flow.

## Configure

### Basics

| Field                   | What to set                                                   |
| ----------------------- | ------------------------------------------------------------- |
| **Input Value**         | Starting number or text, or a [Value](/values/value-store.md) |
| **Operation**           | Mathematical operation to apply                               |
| **Output Storage Name** | Name for the result in the Value Store                        |

### Advanced

| Field              | What to set                                          |
| ------------------ | ---------------------------------------------------- |
| **Status on fail** | [Failed Status](/test-step-options/failed-status.md) |

{% hint style="info" %}
**Pro tip:** Store inputs in Values with clear names (for example `$price` and `$taxRate`) so Calculate Value steps stay readable when the Flow grows.
{% endhint %}

## Related

* [Alias value](/test-steps/data/alias-value.md)
* [Set value](/test-steps/data/set-value.md)
* [Replace value](/test-steps/data/replace-value.md)
* [Data](/test-steps/data.md)

**Tags:** `data`, `process`, `calculate`, `maths`, `sum`, `round`, `floor`, `ceil`, `add`, `subtract`, `multiply`, `divide`
