Find the corresponding value for a given data based on known data

Hello,

I have LibreOffice Calc spreadsheet with table that calculates cost for two services. I want calculate cost of service #2 based on known data. The known data are rates (0,80 and 0,68: both are permanent values) and total incl.VAT 21%. Variable data in column C (unknown): C2 always equal to C3. Based on known data, I want split “Total incl. VAT” amount into a two separate parts, service #1 and service #2 cost. In particular, I want know the ‘service #2’ amount with VAT. (D3 + VAT) Can someone show formula how to make this?

image description

=D3*1,21 - but be aware that these type of calculations may result in rounding errors.

then, how to add 21% with no (or minimal) rounding errors?

105.08 × 0.21 = 22.0668, and D5 shows 22.07.

You will need to choose if #1 or #2 will pay the € 0.0032 difference: just flip a coin. :slight_smile:

then, how to add 21% with no (or minimal) rounding errors?

You already did that. Sum the amounts first, then calculate tax for the sum. The error will never exceed half a penny.

A rounding error is expected in calculations for monetary transactions, because you don’t split the penny. If you calculate tax individually for each item, the errors accumulate. Sometimes they cancel each other out and sometimes they build up.

I guess this is the rounding error situation @anon73440385 warns about. Sometimes the amounts don’t add up nicely because you don’t take those rounding errors into account.