# Modulus?

The AI Help suggests we can calculate the modulus of a number using the % character. But this fails for me.

Help:

5. In the “Type” dropdown, select “Other” and then choose “Math”.
6. Give the column a name and click “Done”.
7. In the “Configuration” field of the Math Column, write the formula to calculate the modulus using the “%” operator. For example, if your number column is named “Number”, the formula would be “Number % 5” to calculate the modulus of the number column divided by 5.

Has anyone else calculated modulus? I need this for a Glide table entry form (so Sheets won’t work).

Thanks!
J

If you want to divide by 5 then it’s…

Amount/5

Edit: For modulus its’s written like…

Mod(5,7)

1 Like

Nope, that was from the AI help.

I want to know if a value is a multiple of 500 (\$). I can get around this with some math namely:

AMOUNT column [assume 8250]
SHARES is ROUND(AMOUNT / 500, 0) = 17 (shares \$500 each)
SHAREAMOUNT is SHARES * 500 = 8500
AMOUNT VALID? is IF SHAREAMOUNT = AMOUNT = TRUE, otherwise = FALSE

But a modulus (math) column would be simpler.

Oh, I didn’t see mention of MOD() function. That works too!

Thanks!

1 Like

Please always take the replies from the AI bot with a grain of salt, it can always hallucinate info.

3 Likes

Understood, thanks. But there was no mention of modulus elsewhere, so that was my fallback! Cool that Glide is testing this out in a practical way. It usually helps me.

Under ‘Functions’

I always check the docs… almost never use the AI

You’re right, Eric, I missed it there. I searched for “modulus” and scanned the functions list but missed MOD.

I understand the AI is imperfect, but it also usually points to the primary reference for its advice, so I can find where in the docs an item is listed.

Thanks!

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.