NumberForm
✖
NumberForm
prints with approximate real numbers having n digits, with f digits to the right of the decimal point.
Details and Options

- NumberForm works on integers as well as approximate real numbers.
- The following options can be given:
-
DefaultPrintPrecision Automatic default print digits for machine numbers 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 the mantissa, base, and exponent NumberMultiplier "×" string to use to indicate multiplication NumberPadding {"","0"} 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 ScientificNotationThreshold {-5,6} where to begin using scientific notation SignPadding False whether to insert padding after the sign - All options except ExponentFunction and ExponentStep apply to integers as well as approximate real numbers.
- You can mix NumberForm and BaseForm. »
- The typeset form of NumberForm[expr] is interpreted the same as expr when used in input. »
- When an input evaluates to NumberForm[expr], NumberForm does not appear in the output. »
Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Scope (6)Survey of the scope of standard use cases
The default display for a machine number:

https://wolfram.com/xid/0cq0js0a-3tuq2

Display more digits than the default:

https://wolfram.com/xid/0cq0js0a-g5rxex


https://wolfram.com/xid/0cq0js0a-ih1j9z


https://wolfram.com/xid/0cq0js0a-e2kf29

Format a high-precision number:

https://wolfram.com/xid/0cq0js0a-cnqm2b


https://wolfram.com/xid/0cq0js0a-b1ylnq

Change the display of numbers in a vector:

https://wolfram.com/xid/0cq0js0a-c84b3w


https://wolfram.com/xid/0cq0js0a-hp8brw


https://wolfram.com/xid/0cq0js0a-bips1r


https://wolfram.com/xid/0cq0js0a-gjobz1

Change the display of inexact numbers in a mixed expression:

https://wolfram.com/xid/0cq0js0a-f4ifyf


https://wolfram.com/xid/0cq0js0a-ggqubo

This number renders in a notebook with two digits of precision:

https://wolfram.com/xid/0cq0js0a-uifewd

Force the number to be rendered with default options:

https://wolfram.com/xid/0cq0js0a-jbeehz

Options (13)Common values & functionality for each option
DefaultPrintPrecision (1)
DigitBlock (2)
ExponentFunction (1)
ExponentStep (1)
NumberFormat (1)
Display numbers in a Fortran‐like form:

https://wolfram.com/xid/0cq0js0a-jg3e9k


https://wolfram.com/xid/0cq0js0a-udll3


https://wolfram.com/xid/0cq0js0a-dozqkd

Display the exponents after converting to scientific form:

https://wolfram.com/xid/0cq0js0a-dctwsg

NumberMultiplier (1)
NumberPadding (1)
NumberPoint (1)
NumberSeparator (1)
NumberSigns (1)
ScientificNotationThreshold (1)
Applications (1)Sample problems that can be solved with this function
Properties & Relations (5)Properties of the function, and connections to other functions
NumberForm and PaddedForm use the same mantissas and exponents by default:

https://wolfram.com/xid/0cq0js0a-clh2nw


https://wolfram.com/xid/0cq0js0a-i8lkfv

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

https://wolfram.com/xid/0cq0js0a-c4j4dm

EngineeringForm uses exponents that are multiples of 3:

https://wolfram.com/xid/0cq0js0a-b0o9lf

AccountingForm does not have exponents:

https://wolfram.com/xid/0cq0js0a-mgsdj


https://wolfram.com/xid/0cq0js0a-ujxfp

Represent the number precise to 3 decimal digits in base 2:

https://wolfram.com/xid/0cq0js0a-nhkc6o

Reconstruct the base 10 number precise to 3 digits:

https://wolfram.com/xid/0cq0js0a-gct9lg

Affect the display of numbers in MatrixForm or TableForm:

https://wolfram.com/xid/0cq0js0a-cmzw84

https://wolfram.com/xid/0cq0js0a-fsn6jo

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

https://wolfram.com/xid/0cq0js0a-4vr1if

Copy the output and paste it into an input cell. The 1.2 is interpreted as 1.23:

https://wolfram.com/xid/0cq0js0a-0ua7s9

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

https://wolfram.com/xid/0cq0js0a-kv2vse

Out is assigned the value 1.23, not NumberForm[1.23,2]:

https://wolfram.com/xid/0cq0js0a-ksbxsp

Possible Issues (2)Common pitfalls and unexpected behavior
Placeholder zeros may be needed if the requested precision is small:

https://wolfram.com/xid/0cq0js0a-bnt2gt


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

https://wolfram.com/xid/0cq0js0a-xkxxt6

The output does not have NumberForm in it:

https://wolfram.com/xid/0cq0js0a-cu8wyl

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

https://wolfram.com/xid/0cq0js0a-f80vzn

The product is not evaluated due to the intervening NumberForm:

https://wolfram.com/xid/0cq0js0a-xw4sjn

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

https://wolfram.com/xid/0cq0js0a-d621g2


https://wolfram.com/xid/0cq0js0a-vf6r9d

Wolfram Research (1988), NumberForm, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberForm.html (updated 2017).
Text
Wolfram Research (1988), NumberForm, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberForm.html (updated 2017).
Wolfram Research (1988), NumberForm, Wolfram Language function, https://reference.wolfram.com/language/ref/NumberForm.html (updated 2017).
CMS
Wolfram Language. 1988. "NumberForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/NumberForm.html.
Wolfram Language. 1988. "NumberForm." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2017. https://reference.wolfram.com/language/ref/NumberForm.html.
APA
Wolfram Language. (1988). NumberForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberForm.html
Wolfram Language. (1988). NumberForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/NumberForm.html
BibTeX
@misc{reference.wolfram_2025_numberform, author="Wolfram Research", title="{NumberForm}", year="2017", howpublished="\url{https://reference.wolfram.com/language/ref/NumberForm.html}", note=[Accessed: 15-April-2025
]}
BibLaTeX
@online{reference.wolfram_2025_numberform, organization={Wolfram Research}, title={NumberForm}, year={2017}, url={https://reference.wolfram.com/language/ref/NumberForm.html}, note=[Accessed: 15-April-2025
]}