Brazilian Users and Taxes

Derek Atkins warlord at MIT.EDU
Thu Jan 9 15:08:19 EST 2014


Henrique Arake <henrique.arake at russomano.adv.br> writes:

[snip]
> Hello everybody!
>
> That doesn't work. The thing is that our tax system is... complicated.
>
> First of all, gnucash uses the following formula to compute the included taxes:
>
> subtotal = total/(1+taxrate).
>
> But, in our case, it should be subtotal = total/(1-taxrate).

Umm, that can't be right.  I think you have Total and Subtotal swapped.
The equation (based on the term definitions) is always:

    Total = Subtotal + TaxAmount

You can solve for Total or you can solve for Subtotal (based on whether
the tax is included in the total or added on to the subtotal in your
locale).  In other words, the Subtotal is, by definition, always less
than (or equal to) the Total.  But that's not the case in your equation
above.

Let's say your taxrate is 5%, and someone spends $10.  Given your
equation the subtotal = 10/(1-.05) == 10/(.95) == 10.53.  But that
cannot be right; the subtotal (which must be less than or equal to the
total) cannot be more than what they paid you!

So let's go back to the original equation:

  Total = Subtotal + TaxAmount

The TaxAmount is usually Subtotal*TaxRate.  At least here in the USA it
is, and in many GST/VAT countries it is as well.  That gives you:

  Total = Subtotal + Subtotal*TaxRate
        = Subtotal*(1+TaxRate)

... Which is the equation that GnuCash uses.

Now, you might have the strange situation in which the tax is actually
computed on the total itself, in which case you might wind up with a
different equation like:

   Subtotal = Total - (Total*TaxRate) = Total * (1-TaxRate)

or

  Total = Subtotal / (1-TaxRate)

Which is probably what you meant above.

> What I did was this. My firm is taxed with a 11,33% rate. So, if a charge R$
> 1.000,00 for a service, this will be considered as the gross value charged
> from my client.
>
> So, X = grossvalue - grossvalue*taxrate
>
> subtotal = 1000 - 1000*0,1133 = 886,7
>
> Then, as X=subtotal, in gnucash it becomes:

... Which shows that I was right; you swapped total and subtotal above..

> X= total/(1+taxrate)
> 886,7=1000/(1+taxrate)
> taxrate=12,77.

Yep, this is pretty much what you need to do.

> The amount is QUITE the same. Apparently, there's some rounding issue. After
> all that, I make the proper adjusts so the total amount of the taxes are
> correctly distributed.

Yeah, you might need to extend the taxrate a few decimal places to get
it closer.  It will round when computing your cents.

> We, also, have a rule that says that, in some cases, the client should
> retain part of the taxes owed by the seller, but we can adjust this manually.

Fair enough,

> Please remember to CC this list on all your replies.
> You can do this by using Reply-To-List or Reply-All.

-derek

-- 
       Derek Atkins, SB '93 MIT EE, SM '95 MIT Media Laboratory
       Member, MIT Student Information Processing Board  (SIPB)
       URL: http://web.mit.edu/warlord/    PP-ASEL-IA     N1NWH
       warlord at MIT.EDU                        PGP key available


More information about the gnucash-user mailing list