WOLFRAM

prints with all numbers in expr given in standard accounting notation.

AccountingForm[expr,n]

prints with numbers given to ndigit precision.

Details and Options

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

In accounting form, negative numbers and scientific notation are not used:

Scope  (5)Survey of the scope of standard use cases

The default display for a machine number:

Out[1]=1

Display more digits than the default:

Display fewer digits:

Format a complex number:

Format a high-precision number:

Use fewer digits:

Change the display of numbers in a vector:

Out[1]=1

A matrix:

Out[3]=3

Change the display of inexact numbers in a mixed expression:

Out[1]=1

Options  (10)Common values & functionality for each option

DigitBlock  (2)

A default integer:

Digits separated in blocks of length 3:

Use fivedigit blocks with spaces as separators:

ExponentFunction  (1)

Compute approximate powers of :

Out[1]=1

Use exponents that are multiples of 3:

Include exponents for powers greater than 10:

NumberFormat  (1)

Display three numbers in accounting form:

Out[1]=1

Display the numbers in a Fortranlike form:

NumberMultiplier  (1)

Use the default multiplier:

Use an asterisk (*) instead:

NumberPadding  (1)

The default does not pad on the left or right:

Pad with spaces on the left:

NumberPoint  (1)

The default is a period:

Display with a comma (,) instead:

NumberSeparator  (1)

The default separator is a comma (,):

Use spaces instead:

NumberSigns  (1)

The default uses parentheses for negative numbers:

Use negative and positive signs instead:

Use words instead of symbols:

SignPadding  (1)

The default pads before signs:

Pad between signs and numbers instead:

Pad with spaces before the left sign and with zeros between the number and the right sign:

Properties & Relations  (4)Properties of the function, and connections to other functions

AccountingForm does not have exponents:

NumberForm and PaddedForm have exponents for powers greater than 5:

ScientificForm has a single digit to the left of the decimal:

EngineeringForm uses exponents that are multiples of 3:

Affect the display of numbers in TableForm or MatrixForm:

Out[2]=2

The typeset form of AccountingForm[expr] is interpreted the same as expr when used in input:

Out[1]=1

Copy the output and paste it into an input cell. The (2) is interpreted as -2:

Out[2]=2

When an input evaluates to AccountingForm[expr], AccountingForm does not appear in the output:

Out is assigned the value 1.`*^7, not AccountingForm[10.^7]:

Out[2]=2

Possible Issues  (2)Common pitfalls and unexpected behavior

Placeholder zeros may be needed if the requested precision is small:

Even when an output omits AccountingForm from the top level, it is not stripped from subexpressions:

The output does not have AccountingForm in it:

Out[2]=2

However, the variable e does have AccountingForm in it, which may affect subsequent evaluations:

The product is not evaluated due to the intervening AccountingForm:

Out[4]=4

Assign variables first and then apply AccountingForm to the result to maintain computability:

Out[6]=6
Wolfram Research (1991), AccountingForm, Wolfram Language function, https://reference.wolfram.com/language/ref/AccountingForm.html (updated 2017).
Wolfram Research (1991), AccountingForm, Wolfram Language function, https://reference.wolfram.com/language/ref/AccountingForm.html (updated 2017).

Text

Wolfram Research (1991), AccountingForm, Wolfram Language function, https://reference.wolfram.com/language/ref/AccountingForm.html (updated 2017).

Wolfram Research (1991), AccountingForm, Wolfram Language function, https://reference.wolfram.com/language/ref/AccountingForm.html (updated 2017).

CMS

Wolfram Language. 1991. "AccountingForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/AccountingForm.html.

Wolfram Language. 1991. "AccountingForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/AccountingForm.html.

APA

Wolfram Language. (1991). AccountingForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AccountingForm.html

Wolfram Language. (1991). AccountingForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AccountingForm.html

BibTeX

@misc{reference.wolfram_2025_accountingform, author="Wolfram Research", title="{AccountingForm}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AccountingForm.html}", note=[Accessed: 01-April-2025 ]}

@misc{reference.wolfram_2025_accountingform, author="Wolfram Research", title="{AccountingForm}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AccountingForm.html}", note=[Accessed: 01-April-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_accountingform, organization={Wolfram Research}, title={AccountingForm}, year={2017}, url={https://reference.wolfram.com/language/ref/AccountingForm.html}, note=[Accessed: 01-April-2025 ]}

@online{reference.wolfram_2025_accountingform, organization={Wolfram Research}, title={AccountingForm}, year={2017}, url={https://reference.wolfram.com/language/ref/AccountingForm.html}, note=[Accessed: 01-April-2025 ]}