Reply to Re: Percentages: Not a php question, but still...

Your name:

Reply:


Posted by Petr Vileta on 09/01/06 12:54

"universalbitmapper" <jbmorla@gmail.com> wrote in
news:1157093880.725466.161370@h48g2000cwc.googlegroups.com...
> Hi,
>
> I'm coding a PHP/MySQL application.
> I'm looking for the formula to compute the original variable after it
> has been applied VAT.
> For instance 100 + 18% -> 118.
> But if I try to find out 100 from 118 - 18%, the result is greater than
> 100.
> I don't have enough maths background to solve the equation:
> c = a + (a*b/100)
> I'm stuck at this point:
> a = (a*b/100) -c
> I would like to have all 'a' on the left side and b and c on the right.
>
> Can someone help?
>

price_without_wat = price_incl_vat / (100 + vat) * 100

In your example: 100 = 118 / (100 + 18) * 100

--

Petr Vileta, Czech republic
(My server rejects all messages from Yahoo and Hotmail. Send me your mail
from another non-spammer site please.)

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация