# Calculations

Whether you're in charge of writing specifications, carrying out a project or monitoring it, it may be useful to track certain data about your requirements. Unfortunately, the data you're looking for may not be directly available. You may need to transform the data, aggregate the data from several requirements, and so on. In the past, customers used to export their requirements to Excel to be able to carry out such operations.

Now, Requirement Yogi lets you perform such calculations directly from Confluence. In particular, you can combine requirement fields, properties, external properties and other data related to your requirements into a formula to extract the data that you need. What’s more, you can perform aggregations based on data from linked requirements (parent or child). This is particularly useful if, for example, you want to extract the sum of man-days needed to meet a requirement based on an external property of its child requirements.

## Use cases - What types of calculations can I make?

### Estimate the cost of a requirement

1.2 * (@Man\ days * 150 + ext@Manufacturing\ Cost)

### Estimate the total cost of a parent requirement

SUM(ext@Cost, from@Refines)

### Detect when a parent requirement is over budget

SUM(ext@Cost, from@Uses) > @Budget

### Detect when parts composing an assembly are too heavy

SUM(@Weight, from@Refines→from@Uses) < @Max\ Weight

Here, the requirement `BB-002`

is marked as an error because the children requirements `BB-DS-004`

and `BB-DS-005`

do not implement the `@Uses`

relationship.

## Traceability Matrix - How to perform calculations?

To perform calculations, simply open a traceability matrix and add a calculation column.

You'll be prompted to enter a formula.

You can edit a formula by double clicking on a calculation table cell, or in the traceability matrix header

Check out the Calculation Syntax for more details.