Why calc fraction returns wrong answer.

I uploaded 2 small files I was working on, is that what you mean? I saved both one in documents folder and the other on the desktop on my computer… They are temporary small files to experiment on. Thanks for the info. :slight_smile: My Libre Office Version 5.4.4.2 Build ID: 1:5.4.4~rc2-0ubuntu0.17.10.1~lo1

I opened both the files (.ods and .xlsx) and checked the fractions displayed in column E. They were correct in every case. (Meanwhile I completed the test with another version. 5.4.4 and 6.0.0 showed no differences.)
Which cell (name one or two) showed a wrong fraction (which one) for you?
Did you try the suggestion concerning your user profile?

Ok cells showing a 1 instead of 3/4 in decimals to fractions.ods B5, B10, B24, E2, E8, E16 and of course E32 is correct I’ll upload the file again.

Opened the second file. Cell A is formatted as Number, no specs for number of decimals. When I set that to 2 decimals, B1 displays 3/4. When I reduce it to 1 decimal, A1 displays 0.8 and B1 displays 4/5. Apparently Calc displays the number rounded to the selected number of decimals, and if nothing is entered there, it assumes 0 decimals and rounds to the nearest whole number…

Wow. Good catch. And I suppose, it is a bug. Formatting of original cell should not affect dependent cell formatting.

I tried that but still the same result. Maybe a newer version of Libre Office is needed for ubuntu Mate 17.10

The document is set to “Precision as shown”!
That’s a very dangerous option that should be abandoned, imo.
In addition: When I downloaded the “C:\fakepath\LO Fraction1.ods” attachment, the cell B1 had the absurd ‘Numbers’ format code #"/"##.

That number format can not work as intended. Calculating with precision as shown in the context of fractions was enhanced for version 6.0

Hello @Richlib,

Please try the following steps:

  1. select your cell B1;
  2. select the menu Format : Clear Direct Formatting;
  3. then set the correct Number Format again…

HTH, lib

This works. The cell is formatted to cell / format / numbers / general / 12/25.
It should be cell / format / numbers / fraction/ whatever.

Hello All: Tried what you said but still getting a one(1). Tried using format in menu bar above but fractions selection is not there. Used right click selected fractions but still getting a one(1) as a result.

I just went ahead and entered the correct fractions via text and right margin formatted the affected cells. Thank all of you for trying to help me. It’s just a small thing that’s happening. I’m not going to quit using Libre Office, it’s a great app. I’m still open to suggestions though. Again, thanks to all of you.

A follow-up to my comment on the comments on the answer by @anon87010807 .
See also this reworked version of the C:\fakepath\LO Fraction1.ods file here.

Disable Precision as shown in Tools > Options > LibreOffice Calc > Calculate.

Disabled precision as shown made no difference still the same ole number 1

The file I got didn’t show the issue for me. Is there another one? Did you try the reworked file I uploaded in return?
Another hunch: You may try to (cautiously) reset your user profile. A corruption of the user profile is known to cause strange errors sometimes. See this guide.

I opened both the files recently attached by editing to the OQ ("two more files: .ods and .xlsx) and checked the fractions displayed in column E. They were correct in every case. (Meanwhile I completed the test with another version. 5.4.4 and 6.0.0 showed no differences.)
Which cell (name one or two) showed a wrong fraction (which one) for you?
Did you try the suggestion concerning your user profile?

If the files I"m uploading to you do work on your Libre Office calc and don’t work on mine that probably means that there is something wrong with my installation. That"s why I sent you screenshots of the the files in question. Is that possible? Should I try and uninstall and reinstall Libre Office?

Did you read the suggestion concerning the user profile contained in my first comment to this answer and repeated in the second one?
If the user profile is corrupted, this will not be cured by a new install. As the UP contains the user’s settings, templates, and “macros”, LibO does not change or replace it when a new version is installed. Please read the guide I linked in above thoroughly.

My user profile was ok according to the steps followed abive.

Have you updated LO? Showed 3/4 in a1 & a2 for me! Dell E6420, LO 5.3.4.2. Format to 123 4/9…OR 123 2/4! On both cells. Seems you may want reinstall LO or at least update. If it doesn’t then. File a bug report.