I get a wrong result in a simple division in calc

Hello, this is really confusing for me.

I’m trying to get the percentage in one column, and I get wrong results. Col A gets the values from a different tab from the same spreadsheet, but that should not matter. The formula I’m using in Col B is: A1/25*100 (A2, A3, …)

12 47
12 46
12 47

But the correct answer should be 48.

What could be the reason?

11,5/25*100 = 46. So, if you use a number format in your A cells, that doesn’t show decimals, but rounds to integers, then you can see the results.

Thank you Mike! That was indeed the case. Now i know why.

It there a was to fix that? I need to use integers. and I need to be sure that the numbers I see are the ones used for the calculations.

Is there a way to achieve this?

Use correct formulas to get correct answers. Like, use “=ROUND(Sheet2.N1)” in your A cells, and get the integer data there from the start.

There’s a way to use calculations “with precision as shown” (or something like that) in preferences - but I’d strongly advise against that, because that is the way to have more problems later (unless you understand very well the consequences).

Thank you again Mike! I found that out after reading your first comment, doing some search and trying it out. Your second comment didn’t appear until I had posted the answer.

Thank you so much!

The option you describe can be found under: Options - Libreoffice Calc - Calculate - Precision as shown, but using it would mean that other people opening and editing the file would get different results, so I understand why you discouraged me from using it. Thank you!

I found the answer to my problem. Big thanks to MIke Kaganski to point me in the right direction!

To achieve the correct results, I have to use the ROUND function to be use the integer is used for further operations.