---
title: numberFormatStyle
framework: foundation
role: symbol
role_heading: Instance Property
path: foundation/measurement/formatstyle/numberformatstyle
---

# numberFormatStyle

The formatting of the measurement value.

## Declaration

```swift
var numberFormatStyle: FloatingPointFormatStyle<Double>?
```

## Discussion

Discussion The numberFormat property specifies the formatting of the measurement value. You can customize the precision, grouping, and rounding mode of the measurement by creating a numeric number format style. The following example shows a customized measurement format style that includes two decimal numbers and excludes separators: let volume = Measurement<UnitVolume>(value: 2300, unit: .milliliters) volume.formatted(.measurement(width: .abbreviated,                               usage: .asProvided,                               numberFormatStyle: .number                                   .precision(.fractionLength(2))                                   .grouping(.never))) // "2300.00 mL"

## See Also

### Modifying a measurement format style

- [width](foundation/measurement/formatstyle/width.md)
- [Measurement.FormatStyle.UnitWidth](foundation/measurement/formatstyle/unitwidth.md)
- [usage](foundation/measurement/formatstyle/usage.md)
- [hidesScaleName](foundation/measurement/formatstyle/hidesscalename.md)
- [locale](foundation/measurement/formatstyle/locale.md)
- [locale(_:)](foundation/measurement/formatstyle/locale(_:).md)
