CalcBuilder Forum

Calculations Not Accurate on Large Numbers

User moon_474 2012-06-05 21:29:19


I'm having an issue with this formula:

if ($actual > $cubic)

On the site I have a cost calculator that takes the Length X Width X Height - The Actual Weight - and then multiples it by the chosen Rate.

I seems to work accurately with small numbers but when I enter 100x100x100 then 250 (for actual weight) and choose 1.57 per pound on the cost the results are not accurate.

The way this calculation is supposed to work (it does with smaller numbers) is it first calculates the cubic weight LxWxH which in this case would be 1,000,000 then compares it to the Actual Weight which is 250, then chooses the larger between the Cubic weight and Actual Weight and then multiples by the Rate..which is $1.57.

When I click calculate it spits out $9.49 when it should be $9457.84 - now if I take the LxWxH and use say 20x20x20 and 250 for the actual weight and $157 for the rate it calculates correctly at $392.50

I'm not sure why it is doing this...I figured a second set of eyes might see something I'm not.

Moonsoft support 2012-06-06 09:45:22


It seems that you apply number format before a calc. Number format returns string not a float (number).

You can delete the following line:


All number format should be at the end.

Hope this helps. Regards,

User moon_474 2012-06-06 16:38:12

I knew it was something I guys are awesome!

Everything is working great now :)

Support/development 10 hours

Get a bigger amount of hours for more complex tasks and get a 10% discount

Buy now!
List Manager

Build different lists for your site

Buy now!