Hi There,

apologies if this is the wrong forum - But i'm looking at creating a Gross Profit calculator for my website, with the user basically having to enter the price for the whole case, the number of units in that case and what % gross profit they are after. The user will then press the calculate button, and it will calculate:

the selling price per unit (exc vat)
the selling price per unit (inc vat) @ 20%
the cash margin per unit

I realise that this is a bit of a begging mail, as my javascript skills are pretty limited (i.e. zilch!). So any help on this would be pretty awesome. I've got the html code for the form which i've quickly knocked up, it's just the JS problems that i have issues with.

HTML Code:
<strong>Gross Profit Calculator</strong>
<br />
<br />
<label>
    Case price (exc VAT):
    <input data-bind="value: CasePrice"/>
</label>
<br />
<label>
    Units case :
    <input data-bind="value: UnitsCase"/>
</label>
<br />
-------------------------------------------------------------
<br />
<label>
    What % GP do you want?: 
    <input data-bind="value: percGP"/>
</label>
<br />
<label>
   Cost price per unit: 
    <output data-bind="value: costPrice"/>
</label>
<br />
-------------------------------------------------------------
<br />
<label>
    Selling price per unit (exc VAT):
    <output data-bind="value: sellPricexVAT"/>
</label>
<br />
<label>
    Selling price per unit (inc VAT):
    <output data-bind="value: sellPriceVAT"/>
</label>
<br />
<br />
<label>
    Cash margin per unit:
    <output data-bind="value: cashMargin"/>
</label>
<br />
<br />
<button type="button">Calculate GP</button>
Any help at all will be pretty awesome,

Thanks!!