format

format(value)

format(value, precision)

Try it yourself:

See also:

Present values clearly with format

format(value) converts a value into a readable textual representation. It is useful for reports, labels, and calculator output where raw numeric precision or matrix syntax is not the desired presentation.

Formatting versus calculation

Format changes how a value is displayed, not its mathematical meaning. Perform arithmetic with the original value using add or multiply, then format at the boundary where text is needed. Use round when the numeric value itself should be rounded before display.

Practical notes

Formatted output may no longer behave as a number in later expressions. Keep units and significant figures explicit, especially for very large or small values. print can help inspect values during a workflow, while typeOf confirms whether a result is still numeric.

Try Format in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions