# Help with rounding numbers

**URL:** <https://forum.kirupa.com/t/help-with-rounding-numbers/250917>\
**Category:** Uncategorized\
**Created:** [February 3, 2008, 1:52pm UTC](https://forum.kirupa.com/t/help-with-rounding-numbers/250917 "2008-02-03T13:52:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pixeldude](https://avatars.discourse-cdn.com/v4/letter/p/57b2e6/32.png) [@pixeldude](https://forum.kirupa.com/u/pixeldude)\
**Post date:** [February 3, 2008, 1:52pm UTC](https://forum.kirupa.com/t/help-with-rounding-numbers/250917/1 "2008-02-03T13:52:19Z")

</div>

Aii there…

okay I really need help with my code…okay how to put “.00” after round the numbers in 2 decimal places…this code works well with another numbers but if I’m try with this number it will output the numbers as “9” only…suppose to 9.00…ok here’s the code

```auto

var basicsalary:Number;

basicsalary = 1877.61;

theresult = basicsalary*0.00479233226837061

trace(theresult);//output = 8.99813099041534

third_decimal_place = (int((theresult*1000))/1000 - int((theresult*100))/100) * 1000;
theresult = int((theresult*100))/100;
if (third_decimal_place >= 5){
    theresult += 0.01;
}

trace(theresult); // it will output 9 suppose to 9.00

```

So how to alter the code so the result will be 9.00

hope someone will shed light for me…thnks in advanced
