# Simple arithmetic - lossing 0

**URL:** <https://forum.kirupa.com/t/simple-arithmetic-lossing-0/319517>\
**Category:** Uncategorized\
**Created:** [February 23, 2011, 11:45am UTC](https://forum.kirupa.com/t/simple-arithmetic-lossing-0/319517 "2011-02-23T11:45:21Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![colouredFunk](https://avatars.discourse-cdn.com/v4/letter/c/a8b319/32.png) [@colouredFunk](https://forum.kirupa.com/u/colouredFunk)\
**Post date:** [February 23, 2011, 11:45am UTC](https://forum.kirupa.com/t/simple-arithmetic-lossing-0/319517/1 "2011-02-23T11:45:21Z")

</div>

hi,

I’m making a simple calculator, where user can enter values into textboxes and then hit the calc button…

eg.

this.sales\_txt.text = “8.50”  
this.buying\_txt.text = “3”

var marginPerLitre:Number = parseFloat(this.sales\_txt.text) - parseFloat(this.buying\_txt.text)

trace(marginPerLitre) // = 5.5 \<–

I need the output to equal 5.50

Any ideas?

Many thanks in advance
