# Dividing total quote amount

**URL:** <https://community.hubspot.com/t/dividing-total-quote-amount/88691>\
**Category:** CMS Development\
**Tags:** professional\
**Created:** [August 31, 2023, 10:37am UTC](https://community.hubspot.com/t/dividing-total-quote-amount/88691 "2023-08-31T10:37:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![PJenkins](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/pjenkins/32/199799_2.png) [@PJenkins](https://community.hubspot.com/u/PJenkins)\
**Post date:** [August 31, 2023, 10:37am UTC](https://community.hubspot.com/t/dividing-total-quote-amount/88691/1 "2023-08-31T10:37:59Z")

</div>

Quick question about quotes!  
I’m wanting to write a section in a quote where I show the quote amount % 3. I am using the comments box for this as I don’t really want to touch the code.  
I have got this for the total quote price :  
\<p\>{{ personalization\_token(‘template\_data.quote.hs\_quote\_amount’, ‘’)|render|format\_currency(template\_data.quote.hs\_locale, template\_data.quote.hs\_currency, true, true) }}\</p\>  
and this for divided by :  
{% set numerator = 106 %}  
{{ numerator|divide(2) }}  
But when I combine the 2 :  
\<p\>{% set numerator = {{ personalization\_token(‘template\_data.quote.hs\_quote\_amount’, ‘’)|render|format\_currency(template\_data.quote.hs\_locale, template\_data.quote.hs\_currency, true, true) }} %} {{ numerator|divide(2) }}\</p\>

It shows an output of 0! I think this may be due to the face that total quote renders with a currency. How could I go about making this work?

Thanks!

---

<div class="post-metadata">

**Author:** ![Jaycee\_Lewis](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/jaycee_lewis/32/61352_2.png) [@Jaycee\_Lewis](https://community.hubspot.com/u/Jaycee_Lewis)\
**Post date:** [September 1, 2023, 7:32am UTC](https://community.hubspot.com/t/dividing-total-quote-amount/88691/2 "2023-09-01T07:32:59Z")

</div>

Hey, @PJenkins I think you’re on the right track.

The `divide` filter expects a numerical value, but `format_currency` returns a string with currency symbols, commas, etc., which cannot be divided.

Have you tried to divide `template_data.quote.hs_quote_amount` before formatting it as currency?

Have fun building! — Jaycee
