title: numfmt
linktitle: NumFmt
description: "Formats a number with a given precision using the requested decimal, grouping, and negative characters."
godocref: ""
workson: []
date: 2017-02-01
publishdate: 2017-02-01
lastmod: 2017-02-01
categories: [functions]
tags: [numbers]
menu:
docs:
parent: "functions"
toc: false
ns: "lang"
signature: ["NumFmt "]
workson: []
hugoversion:
relatedfuncs: []
deprecated: false
draft: false
aliases: []
comments:
lang.NumFmt formats a number with a given precision using the requested decimal, grouping, and negative characters. The default options value is - . ,.
Numbers greater than or equal to 5 are rounded up. For example, if precision is set to 0, 1.5 becomes 2, and 1.4 becomes 1.