# New computed column: Math

**URL:** https://community.glideapps.com/t/new-computed-column-math/1963
**Category:** General
**Created:** [November 13, 2019, 9:07pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963 "2019-11-13T21:07:22Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 15, 2019, 1:55pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/21 "2019-11-15T13:55:26Z")

</div>

@erwblo I’m sure you figured this out already, but the math column is like the template column. You give it placeholder text in the formula, then assign columns to each placeholder.

---

<div class="post-metadata">

### Author: ![erwblo](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/erwblo/32/75_2.png) [@erwblo](https://community.glideapps.com/u/erwblo)
#### Post date: [November 15, 2019, 1:59pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/22 "2019-11-15T13:59:24Z")

</div>

I didn’t know spaces weren’t allowed, I removed the spaces, now it works!

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 3:10pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/23 "2019-11-15T15:10:06Z")

</div>

I was thinking about supporting spaces in names. Maybe I should revisit the decision not to.

---

<div class="post-metadata">

### Author: ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)
#### Post date: [November 15, 2019, 3:17pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/24 "2019-11-15T15:17:31Z")

</div>

Or maybe some helper text that describes what to type. (Value1 \* Value2 + Value3)

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 4:14pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/25 "2019-11-15T16:14:06Z")

</div>

The placeholder in the input field does have a helper text 😉

---

<div class="post-metadata">

### Author: ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)
#### Post date: [November 15, 2019, 4:27pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/26 "2019-11-15T16:27:54Z")

</div>

Maybe a rounding formula?

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 4:45pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/27 "2019-11-15T16:45:33Z")

</div>

What’s your specific use case?

---

<div class="post-metadata">

### Author: ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)
#### Post date: [November 15, 2019, 6:02pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/28 "2019-11-15T18:02:20Z")

</div>

I made the following:  
[convertit.glideapp.io](http://convertit.glideapp.io)

As you will see the conversions show up to 16 decimals, which is not ideal. Similar apps usually show 4 decimals  
[Screenshot\_20191116-005652|236x500](https://community.glideapps.com/uploads/short-url/iXUDtT3ttk3Fi733MVq30zogOov.jpeg)

Also in the example you posted as a GIF, a price per piece is calculated with up to with 16 decimals (in my experience prices were usually calculated with up to 4 decimals).

Maybe allowing us to input a rounding formula for better UX in the math column could be a solution?

Thanks!

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 6:23pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/29 "2019-11-15T18:23:34Z")

</div>

Ah, I see. That seems more a problem of number formatting than of rounding, though.

---

<div class="post-metadata">

### Author: ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)
#### Post date: [November 15, 2019, 6:29pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/30 "2019-11-15T18:29:54Z")

</div>

Sorry, yes you are right.  
If I am not mistaken, at the moment we cannot influence the formatting of the output of a computed column (math in this case)?  
(The result of the currency conversion in my app example is computed by a math column).

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 6:39pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/31 "2019-11-15T18:39:16Z")

</div>

The output of the Math column is just a number, without a format. The number is formatted wherever it’s displayed in the app, and that’s where this oddity happens. Formatting number is [not a trivial issue](https://www.zverovich.net/2019/02/11/formatting-floating-point-numbers.html).

---

<div class="post-metadata">

### Author: ![Muhammad\_iqbal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/muhammad_iqbal/32/246_2.png) [@Muhammad\_iqbal](https://community.glideapps.com/u/Muhammad_iqbal)
#### Post date: [November 15, 2019, 7:08pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/32 "2019-11-15T19:08:33Z")

</div>

Hi Mark, thanks for your awesome new feature.  
Is there any posibility to make calculate App that everybody can use to?

Just like we make calculators app, that every user can calculate not depend on just single value.

So if, I make calculate App like @Karim app [convertit.glideapp.io](http://convertit.glideapp.io), I need the value that insert is different from another user. In that apps, If Karim fill ‘200’, than when I come to that App, the value still ‘200’. I need when every user come it’s blank.

Maybe it possible if I use per user data, but it’s just limited for 500 does/user, of I use pro app it’s limited for 25.000 row. but when the user come back, the value still the last value that user fill.

How?

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 15, 2019, 7:52pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/33 "2019-11-15T19:52:01Z")

</div>

There’s no good way to do this currently, but we’ll have something eventually.

---

<div class="post-metadata">

### Author: ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)
#### Post date: [November 15, 2019, 7:56pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/34 "2019-11-15T19:56:02Z")

</div>

If you have to rely on the spreadsheet to get the result and format it into a text column it sort of defeats the benefit of an instant calculation by creating the Math column. You could just do the math in the spreadsheet and format it. The time lag of displaying the final formatted result would be the same whether you do the math in Glide or in the spreadsheet. I think you need to add the formatting of numbers into Glide and might as well do it for dates too. This could be part of a comprehensive solution to the number and date formats for the different countries.

---

<div class="post-metadata">

### Author: ![Karim](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/karim/32/13974_2.png) [@Karim](https://community.glideapps.com/u/Karim)
#### Post date: [November 16, 2019, 3:17am UTC](https://community.glideapps.com/t/new-computed-column-math/1963/35 "2019-11-16T03:17:50Z")

</div>

Ah yes 😅.  
I guess using such a great no-code tool like Glide tends to make you underestimate the challenges of building it with code!  
Thanks again for all the efforts you and the team are putting into improving glide for all of us 🙌

---

<div class="post-metadata">

### Author: ![gg\_0511](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gg_0511/32/1559_2.png) [@gg\_0511](https://community.glideapps.com/u/gg_0511)
#### Post date: [November 20, 2019, 11:21am UTC](https://community.glideapps.com/t/new-computed-column-math/1963/36 "2019-11-20T11:21:53Z")

</div>

Hello, this is my first comment on this forum although I’ve noted tons of features which would be cool to implement and am excited to see this math column, as the arrayformula took too long to populate in the app… About 2 minutes!

Now, one of the major formulas I use depends on log10(x), or even ln(x) but I can’t figure out how to make this column understand these. Does this also mean other algorithms, sin(), cos(), tan(), etc. are unavailable? Is there a way to write this properly? Thank you!

---

<div class="post-metadata">

### Author: ![Mark](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mark/32/125_2.png) [@Mark](https://community.glideapps.com/u/Mark)
#### Post date: [November 20, 2019, 1:20pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/37 "2019-11-20T13:20:23Z")

</div>

We will add more functionality to the Math column over time, as we see how people use it. May I ask what your use case for the logarithm is?

---

<div class="post-metadata">

### Author: ![gg\_0511](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/gg_0511/32/1559_2.png) [@gg\_0511](https://community.glideapps.com/u/gg_0511)
#### Post date: [November 20, 2019, 1:34pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/38 "2019-11-20T13:34:02Z")

</div>

When calculating your body fat percentage via the U.S. Navy formula; it’s relatively accurate and records over time can significantly help my gym members understand their progress over the weeks.

For men, the following formula: % body fat = 86.010 x log10(abdomen - neck) - 70.041 x log10(height) + 36.76  
For women, the following formula: % body fat = 163.205 x log10(waist + hip - neck) - 97.684 x log10(height) - 78.387

---

<div class="post-metadata">

### Author: ![George\_B](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/george_b/32/534_2.png) [@George\_B](https://community.glideapps.com/u/George_B)
#### Post date: [November 20, 2019, 2:59pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/39 "2019-11-20T14:59:57Z")

</div>

Just an FYI for our metric friends, the abdomen, neck, waist, hip measurements are in inches when using this formula.

---

<div class="post-metadata">

### Author: ![Clement](https://avatars.discourse-cdn.com/v4/letter/c/7ba0ec/32.png) [@Clement](https://community.glideapps.com/u/Clement)
#### Post date: [November 20, 2019, 3:36pm UTC](https://community.glideapps.com/t/new-computed-column-math/1963/40 "2019-11-20T15:36:02Z")

</div>

> [@Mark](#):
>
> Doing it in the spreadsheet is not trivial. You need to know `ARRAYFORMULA` and a bunch of tricks to make it work dependably.

For the beauty of it, is there anywhere (post, app, etc.) I can find the “how we did it before”? =)

[Previous page](https://community.glideapps.com/t/new-computed-column-math/1963.md?page=1)

[Next page](https://community.glideapps.com/t/new-computed-column-math/1963.md?page=3)
