# How to calculate with floating values in Hugo?

**URL:** <https://discourse.gohugo.io/t/how-to-calculate-with-floating-values-in-hugo/1524>\
**Category:** support\
**Created:** [August 5, 2015, 4:38pm UTC](https://discourse.gohugo.io/t/how-to-calculate-with-floating-values-in-hugo/1524 "2015-08-05T16:38:32Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![tatsushid](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.gohugo.io/tatsushid/32/7219_2.png) [@tatsushid](https://discourse.gohugo.io/u/tatsushid)\
**Post date:** [August 5, 2015, 9:57pm UTC](https://discourse.gohugo.io/t/how-to-calculate-with-floating-values-in-hugo/1524/4 "2015-08-05T21:57:07Z")

</div>

@jura, in your example, a floating value will be returned if 100 is replaced by 100.0 like

```auto
{{ div (mul $done 100.0) $total }}% done

```

`doArithmetic` internal function converts integer to float if one of arguments includes a float value.

---

_[View the full topic](https://discourse.gohugo.io/t/how-to-calculate-with-floating-values-in-hugo/1524)._
