No round() in Power Automate? Here's What to Do Instead (Plus Advanced Math via MathJS)
- Jeff Taylor
- Aug 20
- 2 min read
Updated: Aug 21
If you’ve ever tried to round numbers in Power Automate, you’ve probably discovered something annoying: there’s no built-in Power Automate rounding function.
That’s right. You can’t just do:
round(3.14159, 2)
Â
…because it doesn’t exist.
Â
But don’t worry - there are workarounds. And suppose you’re looking to go even deeper with math operations (logarithms, powers, roots, algebra). In that case, there’s a powerful solution using the open-source MathJS library included in this blog post as well.
Â
How to Round Numbers in Power Automate
Even though there's no official Power Automate round() function, you can still round numbers using the formatNumber() expression:
Â
formatNumber(3.14159, '#0.00')
Â
outputs 3.14.
Â
Need a whole number? Just drop the decimals:
Â
formatNumber(3.14159, '#0')
Â
outputs 3.
Â
This works great for formatting and even for use in simple logic conditions. But if you're doing deeper numeric operations, this approach has its limits.
Want Real Math? Create a MathJS Custom Connector
For anything beyond basic formatting - like:
Â
round(2.717854, 3) → 2.718
pow(5, 6) → 15625
log(10000, 10) → 4
sqrt(4) → 2
Â
You can even use variables/algebra like this, or use the array concept to pass multiple operations at once:
Expression: [ a = 1.2 * (2 + 4.5), a / 2]Â
Result: [7.8, 3.9]
How it Works
You pass a math expression (expr) to MathJS via a custom connector. The connector handles the calculation and returns the result.
Â
Power Automate Action Definition:
Â

Â
Power Automate Result:

Key Features of MathJS
No API key needed
 Supports hundreds of math functions - full list at functions for MathJS
 Free service with:
10-second max evaluation time
10,000 requests/day
Works well for loops, expressions, conditionals, and calculated values in flows
Requires premium licensing
Â
How to Create the Custom Connector
You can import the custom connector using the MathJS.swagger.json file. Here's a video on how to import the file.
Â
Once imported:
Add it as a step in your Power Automate flow
Use the expr field to write any valid MathJS expression
Get your result directly back in the response
Â
As always, if you have any questions or you're looking for Power Platform assistance, just reach out; we're always happy to help.
Happy Building!
Â