AccountingForm[expr]
prints with all numbers in expr given in standard accounting notation.
AccountingForm[expr,n]
prints with numbers given to n‐digit precision.
AccountingForm
AccountingForm[expr]
prints with all numbers in expr given in standard accounting notation.
AccountingForm[expr,n]
prints with numbers given to n‐digit precision.
Details and Options
- AccountingForm never uses scientific notation.
- AccountingForm uses parentheses to indicate negative numbers.
- The following options can be given:
-
DigitBlock Infinity number of digits between breaks ExponentFunction Automatic function to apply to exponents ExponentStep 1 steps by which exponents can increase NumberFormat Automatic function used to assemble mantissa, base, and exponent NumberMultiplier "×" string to use to indicate multiplication NumberPadding {"",""} strings to use for left and right padding NumberPoint "." decimal point string NumberSeparator {","," "} string to insert at breaks between blocks NumberSigns {{"(",")"},""} strings to use for signs of negative and positive numbers SignPadding False whether to insert padding after the sign - The typeset form of AccountingForm[expr] is interpreted the same as expr when used in input. »
- When an input evaluates to AccountingForm[expr], AccountingForm does not appear in the output. »
Examples
open all close allBasic Examples (1)
Scope (5)
The default display for a machine number:
nE = N[E]Display more digits than the default:
AccountingForm[nE, 10]AccountingForm[nE, 2]AccountingForm[RandomComplex[10 ^ 10 + 10 ^ 10I]]Format a high-precision number:
AccountingForm[N[Pi ^ 5, 20]]AccountingForm[N[Pi ^ 5, 20], 10]Change the display of numbers in a vector:
RandomReal[2000, 5]AccountingForm[%, 4]RandomReal[2 10 ^ 8, {3, 3}]AccountingForm[%]Change the display of inexact numbers in a mixed expression:
10. ^ 10Sin[x / 7.]AccountingForm[%]Options (10)
DigitBlock (2)
ExponentFunction (1)
Compute approximate powers of :
p = N[E ^ Range[10, 50, 10]]Use exponents that are multiples of 3:
AccountingForm[p, ExponentFunction -> (3Quotient[#, 3]&)]Include exponents for powers greater than 10:
AccountingForm[p, ExponentFunction -> (If[-10 < # < 10, Null, #]&)]NumberFormat (1)
NumberMultiplier (1)
NumberPadding (1)
NumberPoint (1)
NumberSeparator (1)
NumberSigns (1)
The default uses parentheses for negative numbers:
AccountingForm[{-1 / 3., 2 / 3.}]Use negative and positive signs instead:
AccountingForm[{-1 / 3., 2 / 3.}, NumberSigns -> {"-", "+"}]AccountingForm[{-1 / 3., 2 / 3.}, NumberSigns -> {"minus ", "plus "}]SignPadding (1)
The default pads before signs:
AccountingForm[{-1.2345, 2.4680}, 10, NumberPadding -> {" ", " "}]Pad between signs and numbers instead:
AccountingForm[{-1.2345, 2.4680}, 10, SignPadding -> True, NumberPadding -> {" ", " "}]Pad with spaces before the left sign and with zeros between the number and the right sign:
AccountingForm[{-1.2345, 2.4680}, {10, 6}, SignPadding -> {False, True}, NumberPadding -> {" ", "0"}]Properties & Relations (4)
AccountingForm does not have exponents:
AccountingForm[N[E ^ Range[10, 20, 2]], 10]NumberForm and PaddedForm have exponents for powers greater than 5:
NumberForm[N[E ^ Range[10, 20, 2]], 10]PaddedForm[N[E ^ Range[10, 20, 2]], 10]ScientificForm has a single digit to the left of the decimal:
ScientificForm[N[E ^ Range[10, 20, 2]], 10]EngineeringForm uses exponents that are multiples of 3:
EngineeringForm[N[E ^ Range[10, 20, 2]], 10]Affect the display of numbers in TableForm or MatrixForm:
m = RandomReal[10 ^ 4, {3, 2}];{TableForm[m], AccountingForm[TableForm[m], 4]}The typeset form of AccountingForm[expr] is interpreted the same as expr when used in input:
{AccountingForm[-2]}Copy the output and paste it into an input cell. The (2) is interpreted as -2:
{-2}When an input evaluates to AccountingForm[expr], AccountingForm does not appear in the output:
AccountingForm[10. ^ 7]Out is assigned the value 1.`*^7, not AccountingForm[10.^7]:
%Possible Issues (2)
Placeholder zeros may be needed if the requested precision is small:
AccountingForm[12345.6, 3]Even when an output omits AccountingForm from the top level, it is not stripped from subexpressions:
e = AccountingForm[10. ^ 7]The output does not have AccountingForm in it:
%However, the variable e does have AccountingForm in it, which may affect subsequent evaluations:
FullForm[e]The product is not evaluated due to the intervening AccountingForm:
10 * eAssign variables first and then apply AccountingForm to the result to maintain computability:
(f = 10. ^ 7)//AccountingForm10 * fSee Also
Tech Notes
Related Guides
History
Introduced in 1991 (2.0) | Updated in 2017 (11.2)
Text
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.
APA
Wolfram Language. (1991). AccountingForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/AccountingForm.html
BibTeX
@misc{reference.wolfram_2026_accountingform, author="Wolfram Research", title="{AccountingForm}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/AccountingForm.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_accountingform, organization={Wolfram Research}, title={AccountingForm}, year={2017}, url={https://reference.wolfram.com/language/ref/AccountingForm.html}, note=[Accessed: 13-June-2026]}