Microsoft KB Archive/117471

Calculation Gives Incorrect Number of Decimal Places

PSS ID Number: Q117471 Article last modified on 03-07-1997

=
========================================================= 5.00 5.10 MACINTOSH kbusage kbdocerr

= SYMPTOMS =

If you are using Word to calculate percentage, Word’s result may be rounded to more decimal places than appear in the calculation. According to the Word user’s guide, the result should display with the same number of decimal places as the number with the most decimal places in the calculation. For example, if you calculate 17.5 percent of 45 (expressed as 45*17.5%), you would expect the result to be 7.9, but the result is 7.875.

= CAUSE =

When Word considers a percentage, it moves the decimal place two places to the right, and expresses the percentage in terms of parts of 100 before it performs the calculation. For example 1% is .01, 10% is .1, 10.5% is .105, and 10.6789% is .106789. Thus, a percentage always has two more decimal places than appear in the calculation.

= WORKAROUND =

First, round the percentage figure to write the percentage out to the number of decimal places you want in the result. For example, if you want the result rounded to two decimal places, write 10% as 10.00, or 2% as 2.00, or 7.5% as 7.50. Then divide this number by 100.

A common instance of this problem occurs in working with money. For example, when calculating a 17.5 percent tax, Word gives a result having three decimal places, even though money commonly works with two decimal places. In this case, you can work around the problem as follows:

To calculate 17.5 percent of $45 use the formula:

45 * (17.50/100)

= MORE INFORMATION =

The “Microsoft Word for the Macintosh User’s Guide, version 5.0, incorrectly states on page 307,”When Word calculates it displays the result with the same number of decimal points as the number with the most decimal places in the selection.&quot;

The Word 4.0 user’s guide has a similar error on page 188, as does the Word 3.0 user’s guide on page 201.

KBCategory: kbusage kbdocerr KBSubcategory: Additional reference words: 3.01 3.02 4.00 5.00 5.10 math Command Equal macword5 Equals = ====================================================================== ============================================================================= Copyright Microsoft Corporation 1997.