---
title: "fractionLength(_:)"
framework: foundation
role: symbol
role_heading: Type Method
path: "foundation/numberformatstyleconfiguration/precision/fractionlength(_:)-3wkd9"
---

# fractionLength(_:)

Returns a precision that constrains formatted values to a given number of allowed digits in the fraction part.

## Declaration

```swift
static func fractionLength(_ length: Int) -> NumberFormatStyleConfiguration.Precision
```

## Parameters

- `length`: The number of digits to use when formatting the fraction part of a number.

## Return Value

Return Value A precision that constrains formatted values to a given number of allowed digits in the fraction part.

## See Also

### Precision configurations

- [significantDigits(_:)](foundation/numberformatstyleconfiguration/precision/significantdigits(_:)-2rp7g.md)
- [significantDigits(_:)](foundation/numberformatstyleconfiguration/precision/significantdigits(_:)-9dvpr.md)
- [integerAndFractionLength(integerLimits:fractionLimits:)](foundation/numberformatstyleconfiguration/precision/integerandfractionlength(integerlimits:fractionlimits:).md)
- [integerAndFractionLength(integer:fraction:)](foundation/numberformatstyleconfiguration/precision/integerandfractionlength(integer:fraction:).md)
- [integerLength(_:)](foundation/numberformatstyleconfiguration/precision/integerlength(_:)-u8ua.md)
- [integerLength(_:)](foundation/numberformatstyleconfiguration/precision/integerlength(_:)-1njyz.md)
- [fractionLength(_:)](foundation/numberformatstyleconfiguration/precision/fractionlength(_:)-w6fk.md)
