# How to make a calculation in the template

**URL:** https://community.silverfin.com/t/how-to-make-a-calculation-in-the-template/2259
**Category:** Exports
**Tags:** export, as\_attribute, attribute\_currency
**Created:** [March 16, 2022, 2:07pm UTC](https://community.silverfin.com/t/how-to-make-a-calculation-in-the-template/2259 "2022-03-16T14:07:03Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![michel](https://avatars.discourse-cdn.com/v4/letter/m/ea666f/32.png) [@michel](https://community.silverfin.com/u/michel)
#### Post date: [March 16, 2022, 2:07pm UTC](https://community.silverfin.com/t/how-to-make-a-calculation-in-the-template/2259/1 "2022-03-16T14:07:03Z")

</div>

I have created a new export. But there is still a mistake.

The intention is that the value in A should be processed in B.  
the calculation should be the following:  
B= (71.697,85-A)/(214.166,80-A)x100

Can someone help me with that?

 ![tamplate image](https://canada1.discourse-cdn.com/flex030/uploads/getsilverfin/original/2X/8/86f0f9b857554e17464856a7ab3fdfbd408d06bd.png)

---

<div class="post-metadata">

### Author: ![Michiel](https://yyz2.discourse-cdn.com/flex030/user_avatar/community.silverfin.com/michiel/32/2364_2.png) [@Michiel](https://community.silverfin.com/u/Michiel)
#### Post date: [March 16, 2022, 4:00pm UTC](https://community.silverfin.com/t/how-to-make-a-calculation-in-the-template/2259/2 "2022-03-16T16:00:56Z")

</div>

Hi @michel ,

without a code snippet it’s hard to give some specific advise, but your code can look like this:

```auto
... uit te keren van {% input custom.waarde.dividend as:currency %}
...
De solvabiliteit bedraag (X - {{ custom.waarde.dividend | currency }})/(Y - {{ custom.waarde.dividend | currency }}) * 100 == {{ (x-custom.waarde.dividend)/(y-custom.waarde.dividend)*100 | percentage }}

```

More info on the sprint syntax can be found [here](https://developer.silverfin.com/docs/syntax).

Kind regards,

Michiel
