July 21, 2024

I have to admit that the div function and all the other analogous functions (sub, add, and mul) is quite strange. This function will divide two numbers. Having functions to do basic arithmetic is not common in programming languages or platforms. Usually, we can do things like “number/number,” but not in Power Automate. This is a source of many “head-scratching moments” since the function looks correct with a slash sign, but Power Automate will return an error.

2022-09-05: Thanks to Patrick for finding an error in the article.

Note: The concepts will be similar to all four functions so expect that the reference will be quite similar.


It follows a simple pattern.

  1. Number
  2. Number

The function will return the first divided by the second number.



will return 


It will always return a number.


There’s a hard limitation on the size of the numbers you can pass, in this case, 19. Power Automate will return an error for:


But it won’t return an error for:


However, not returning an error doesn’t mean that the calculation is correct. We would expect the same number in the first case, but instead, we get “1234567890123456800”. Notice that after the 18th number, all is truncated to zero. This may be a source of errors since no error is returned, but instead, you get an invalid calculation. Be very careful with the size of your number since it won’t return an error, but the result is incorrect.


  1. Keep the numbers as small as possible and all in variables. Don’t put the numbers directly in the function, at least the first one. It’s quite useful to have the second hardcoded when performing some pre-defined actions like incrementing a variable.
  2. Be sure that the divisor (the second number) is not zero; otherwise, you’ll split the atom (bad joke, sorry).
  3. Don’t nest it. You may nest operations, but it will make debugging a lot harder. Do the calculations in individual steps to see the results in each one and see if you get the desired value.
  4. Please note that formulas may have localization-based differences. For example, you should write “div” with “separating each of the arguments, but if your regional settings are set to Portugal, you should use “;” instead.


Microsoft’s div Function Reference

Back to the Power Automate Function Reference.

Photo by C D-X on Unsplash

Manuel Gomes

I have 18 years of experience in automation, project management, and development. In addition to that, I have been writing for this website for over 3 years now, providing readers with valuable insights and information. I hope my expertise allows me to create compelling, informative content that resonates with the audience.

View all posts by Manuel Gomes →

2 thoughts on “Power Automate: div Function

    1. You’re 100% correct. Sorry about that. I fixed the article and added a small mention to you if you don’t mind.

Leave a Reply to Patrick Holmes Cancel reply

Your email address will not be published. Required fields are marked *