# custom calculation formula for line items

**URL:** <https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825>\
**Category:** Tips, Tricks & Best Practices\
**Tags:** how-to\
**Created:** [February 4, 2026, 4:13pm UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825 "2026-02-04T16:13:10Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ribe90](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ribe90/32/75082_2.png) [@Ribe90](https://community.hubspot.com/u/Ribe90)\
**Post date:** [February 4, 2026, 4:13pm UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825/1 "2026-02-04T16:13:10Z")

</div>

Thanks to the new update, I created a custom calculation property for line items to calculate the unit price after applying a percentage discount.

The formula used is:  
(unit price - (unit price \* (unit discount / 100)))

When testing the property, the calculation works correctly. However, when I add this property in the line item section during quote creation, the calculation does not work as expected: it only works if the discount is entered as an absolute number rather than a percentage.

This behavior seems inconsistent, since the property test returns the correct result.

---

<div class="post-metadata">

**Author:** ![RNoll](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rnoll/32/70782_2.png) [@RNoll](https://community.hubspot.com/u/RNoll)\
**Post date:** [February 4, 2026, 7:49pm UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825/2 "2026-02-04T19:49:59Z")

</div>

Fair warning, I just used Hub Helper Harry, a HubSpot-related GPT, to find this answer.

It suggested replacing “unit discount” with “discount\_percentage”, since apparently **u**** nit discount **= a** currency amount.**

It recommends changing your formula to: **unit\_price \* (1 - (discount\_percentage / 100))**.

So if you wanted to give someone a 10% discount, in the discount\_percentage property:

- You enter 10.
- HubSpot _ **displays** _ it as **10%**
- Under the hood, the value is still just 10, though, which is why you still need to divide by 100.

I hope this helps.

Robyn

---

<div class="post-metadata">

**Author:** ![Ribe90](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ribe90/32/75082_2.png) [@Ribe90](https://community.hubspot.com/u/Ribe90)\
**Post date:** [February 5, 2026, 9:55am UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825/3 "2026-02-05T09:55:28Z")

</div>

Thanks so much Robyn for your help

---

<div class="post-metadata">

**Author:** ![Ribe90](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/ribe90/32/75082_2.png) [@Ribe90](https://community.hubspot.com/u/Ribe90)\
**Post date:** [February 5, 2026, 2:47pm UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825/4 "2026-02-05T14:47:57Z")

</div>

@RNoll Now everything works, thank you very much. However, I’m having a new problem. When I try to insert it into the estimate template, I can’t find it even though I used it in the estimate construction table. Any suggestions?

---

<div class="post-metadata">

**Author:** ![RNoll](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/rnoll/32/70782_2.png) [@RNoll](https://community.hubspot.com/u/RNoll)\
**Post date:** [February 5, 2026, 4:07pm UTC](https://community.hubspot.com/t/custom-calculation-formula-for-line-items/145825/5 "2026-02-05T16:07:28Z")

</div>

Just FYI, this was generated by Hub Helper Harry again. Our company does not use the Sales Hub or Quotes.  
Here’s its response:

Yes — this is expected behavior in HubSpot, and it’s **not related to the formula** anymore.

## What’s happening

There are **two different contexts** in HubSpot, and they behave differently:

1. **Quote editor (estimate construction table)**

2. **Estimate / quote template**

So even though the property:

- Exists
- Calculates correctly
- Is already used on the estimate

…it will **not appear in the template** unless the line item table itself is customized.

This is a **template limitation** , not a calculation issue.

* * *

## Why you can’t find the property in the template

The most common reasons are:

### 1. The template uses the default line item table

The default table:

- Supports only a predefined set of standard fields
- Does not surface custom line item properties

### 2. The property is custom (calculated or not)

This is expected behavior.  
Custom line item properties **do not appear by default** in templates unless the table is custom-configured.

### 3. The template was created before the property existed

In some cases, templates don’t refresh available fields automatically. Re-adding the line item table or duplicating the template can help.

* * *

## What to do next (practical steps)

### Option A — Use a custom line item table (recommended)

In the quote template editor:

- Remove the default line item table
- Insert a **custom line item table**
- Manually add the calculated property as a column

This is the **only reliable way** to surface custom line item calculations.

* * *

### Option B — Use an existing supported field

If the number must appear on quotes but **not necessarily as its own column** :

- Map the value into a supported field (e.g., unit price or total)
- Let HubSpot render it automatically

Less flexible, but simpler.

* * *

If you want, tell me:

- Your Sales Hub tier
- Whether this is a **quote** or **estimate** template
- Whether you’re using the default or custom line item table

it can give you exact click-by-click steps.

I hope that helps!

Robyn
