How to Round Numbers in SOLIDWORKS Equations

Article by Andrew Lidstone, CSWE updated April 30, 2015


Equations in SOLIDWORKS can be a very powerful tool to automatically calculate dimensions and other parameters in SOLIDWORKS models. However what do you do when you require round numbers in SOLIDWORKS equations?

There are two functions that you can choose from depending on your requirements, the int() function and the round() function.

The int() function can be used to round a decimal value DOWN to the closest whole number.


Integer function

The round() function can be used in equations to round results to the closest whole number either up or down.


Round Function

The equation round function in SOLIDWORKS uses “round half to even” also call Bankers’ Rounding, so 0.5 rounds to 0, 1.5 rounds to  2, 2.5 rounds to 2, 3.5 rounds to 4, etc.

In SOLIDWORKS, unlike other programs like Microsoft Excel, there is no built in function that would always round a value UP to the closest whole number.  If you need to ensure that a calculation is always being rounded up to the next higher whole value you can use an If function in combination with the Integer function.

Related Links

Certified SOLIDWORKS Services available from Javelin

Javelin can help you to:

Find Related Content by TAG:

Andrew Lidstone, CSWE

Andrew Lidstone is a SOLIDWORKS Elite Application Engineer specializing in Data Management systems. He has been working in the SOLIDWORKS reseller channel since 2010 helping clients get the most from their CAD tools.