> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# CalculationType

- Package: [@gooddata/sdk-ui-charts](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-charts/index.md)
- Kind: type-alias
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.64/libs/sdk-ui-charts/src/interfaces/comparison.ts

Defines the calculation types for an algorithm.

**Signature:**

```typescript
export type CalculationType = "change" | "ratio" | "difference" | "change_difference";
```

## Remarks

The table below summarizes the available calculation types:

<table>  <tr><th width="150">Type</th><th width="350">Algorithm</th></tr>  <tr><td>change</td><td>(Primary - Secondary) / Secondary</td></tr>  <tr><td>difference</td><td>Primary - Secondary</td></tr>  <tr><td>ratio</td><td>Primary / Secondary</td></tr>  <tr>  <td>change\_difference</td>  <td>  Change: (Primary - Secondary) / Secondary  <br/>  Difference: Primary - Secondary  </td>  </tr> </table>
