KNOWLEDGEBASE - ARTICLE #2007

How to round values down to a specified number of decimal places?

You can use the Change..Decimal Format command to tell Prism to only show a specified number of digits after the decimal. But when you go to edit the data, all the digits you entered or pasted are still there. If you truly want to round the data down to a specified number of of digits, you'd need to use a user-define transform. 

Click Analyze and choose Transform. Then choose User-defined Y transform. Then click "Add..." to add a new function. 

Here is  a transform that rounds numbers to only include two digits after the decimal:

Y = Floor(Y*10^2 + 0.5)/10^2

The transform multiplies the Y values by 10^2 or 100, adds 0.5, and then rounds down to the lower integer (that is what the Floor function does). Then it divides by 100. 

Replace "2" in two places by "3" to round to three places, etc. 

The results will appear on a results page. They will actually show one more digit than you want and that last digit will always be zero. You can use Format Decimal format to show one fewer decimal place.

 

Explore the Knowledgebase

Analyze, graph and present your scientific work easily with GraphPad Prism. No coding required.