i have used tried a simple calculation but it seems to be adding up wrong its 1p out
£5.46 + £21.34 + £0.71 = should be £27.51 but it keeps giving me £27.52
spreadsheet attached
[Solved] Simple sum is wrong
[Solved] Simple sum is wrong
- Attachments
-
- Electric invoice template.ods
- (18.98 KiB) Downloaded 60 times
Last edited by MrProgrammer on Sat Dec 07, 2024 7:58 pm, edited 3 times in total.
Reason: Add "sum" to title
Reason: Add "sum" to title
OpenOffice 4.1.15 on windows 11 Home
- Hagar Delest
- Moderator
- Posts: 33629
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: simple calculation adding up wrong
Hi and welcome to the forum!
This is due to the display of rounded numbers.
They display with 2 digits as:
£5.46
£21.34
£0.71
However, the true value is (increase the number of digits):
£5.460
£21.344
£0.713
Thus leading to £27.517, rounded to... £27.52.
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
This is due to the display of rounded numbers.
They display with 2 digits as:
£5.46
£21.34
£0.71
However, the true value is (increase the number of digits):
£5.460
£21.344
£0.713
Thus leading to £27.517, rounded to... £27.52.
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Re: Simple calculation adding up wrong
There is an option in the LO Calc - Calculate settings: "Precision as shown".
You can try it.
...I never use it.
You can try it.
...I never use it.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
Re: Simple calculation adding up wrong
is there any way to change it so it adds up to the ignoring all the other decimal places? so the answer is £27.52?
OpenOffice 4.1.15 on windows 11 Home
Re: Simple calculation adding up wrong
Use ROUND() on your calculations to limit the values to two decimals. For example in F18 use:
Code: Select all
=ROUND(B18 * D18; 2)Slackware 15 (current) 64 bit
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Apache OpenOffice 4.1.16
LibreOffice 26.2.3.2; SlackBuild for 26.2.3 by Eric Hameleers
---------------
I hate this damn computer, I wish that I could sell it.
It won't do what I want it to, Only what I tell it.
Re: Simple calculation adding up wrong
You can ROUND the operands and/OR the results.is there any way to change it so it adds up to the ignoring all the other decimal places? so the answer is £27.52?
Or you can use the "Precision a shown" option for the Calc application.
Tibor Kovacs, Hungary; LO7.5.8/25.8.5.2 /Win7-10-11 x64Prof.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
PortableApps: LO3.3.0-25.8.5.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
- Hagar Delest
- Moderator
- Posts: 33629
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Simple calculation adding up wrong
My 2 cents: round each detail line, thus the result will show the exact sum of the lines.
If you round the result only and someone sums each line then he can complain that there is a discrepancy.
Please add [Solved] at the beginning of the title in your first post (top of the topic) with the 🖉 button if your issue has been fixed.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.