PaddedForm
✖
PaddedForm
prints with approximate real numbers having exactly f digits to the right of the decimal point.
Details and Options

- By default, PaddedForm pads with spaces on the left to leave room for n digits.
- PaddedForm pads with zeros on the right in approximate real numbers.
- The length n specified in PaddedForm counts only digits, and not signs, breaks between digits, and so on.
- PaddedForm has the same options as NumberForm, with the following changes: [List of all options]
-
NumberPadding {" ","0"} strings to use for left and right padding - You can use PaddedForm to align columns of numbers.
- The typeset form of PaddedForm[expr] is interpreted the same as expr when used in input. »
- When an input evaluates to PaddedForm[expr], PaddedForm does not appear in the output. »
-
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
List of all options

Examples
open allclose allBasic Examples (2)Summary of the most common use cases
Display the first 10 digits of a numeric approximation to :

https://wolfram.com/xid/0enyqwtx2-s3etif


https://wolfram.com/xid/0enyqwtx2-da1xe1

Display a number with 3 precise digits and 4 digits to the right of the decimal:

https://wolfram.com/xid/0enyqwtx2-co4ndf

Scope (5)Survey of the scope of standard use cases
The default display for a machine number:

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

Display more digits than the default:

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


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


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

Format a high-precision number:

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


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

Change the display of numbers in a vector:

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


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


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


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

Change the display of inexact numbers in a mixed expression:

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


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

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

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


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


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

Display the exponents after converting to scientific form:

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

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

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


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

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

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

EngineeringForm uses exponents that are multiples of 3:

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

AccountingForm does not have exponents:

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


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

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

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

Reconstruct the base-10 number precise to 3 digits:

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

Change the display of numbers in MatrixForm or TableForm:

https://wolfram.com/xid/0enyqwtx2-k0xty5

https://wolfram.com/xid/0enyqwtx2-8umv2

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

https://wolfram.com/xid/0enyqwtx2-5tera1

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

https://wolfram.com/xid/0enyqwtx2-42bpl

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

https://wolfram.com/xid/0enyqwtx2-g4h7g

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

https://wolfram.com/xid/0enyqwtx2-5g8gji

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

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


By default, room is set aside for the larger of the two number signs:

https://wolfram.com/xid/0enyqwtx2-iyj6yc


https://wolfram.com/xid/0enyqwtx2-jwr84w

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

https://wolfram.com/xid/0enyqwtx2-q181da

The output does not have PaddedForm in it:

https://wolfram.com/xid/0enyqwtx2-e8vesu

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

https://wolfram.com/xid/0enyqwtx2-kl165

The product is not evaluated due to the intervening PaddedForm:

https://wolfram.com/xid/0enyqwtx2-o423az

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

https://wolfram.com/xid/0enyqwtx2-ivhw5k


https://wolfram.com/xid/0enyqwtx2-oy9nr4

Wolfram Research (1991), PaddedForm, Wolfram Language function, https://reference.wolfram.com/language/ref/PaddedForm.html.
Text
Wolfram Research (1991), PaddedForm, Wolfram Language function, https://reference.wolfram.com/language/ref/PaddedForm.html.
Wolfram Research (1991), PaddedForm, Wolfram Language function, https://reference.wolfram.com/language/ref/PaddedForm.html.
CMS
Wolfram Language. 1991. "PaddedForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PaddedForm.html.
Wolfram Language. 1991. "PaddedForm." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/PaddedForm.html.
APA
Wolfram Language. (1991). PaddedForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PaddedForm.html
Wolfram Language. (1991). PaddedForm. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PaddedForm.html
BibTeX
@misc{reference.wolfram_2025_paddedform, author="Wolfram Research", title="{PaddedForm}", year="1991", howpublished="\url{https://reference.wolfram.com/language/ref/PaddedForm.html}", note=[Accessed: 08-May-2025
]}
BibLaTeX
@online{reference.wolfram_2025_paddedform, organization={Wolfram Research}, title={PaddedForm}, year={1991}, url={https://reference.wolfram.com/language/ref/PaddedForm.html}, note=[Accessed: 08-May-2025
]}