---
title: scale()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/nsdecimalnumberbehaviors/scale()
---

# scale()

Returns the number of digits allowed after the decimal separator.

## Declaration

```swift
func scale() -> Int16
```

## Return Value

Return Value The number of digits allowed after the decimal separator.

## Discussion

Discussion This method limits the precision of the values returned by NSDecimalNumber’s decimalNumberBy... methods. If scale() returns a negative value, it affects the digits before the decimal separator as well. If scale() returns NSDecimalNoScale, the number of digits is unlimited. Assuming that roundingMode() returns NSRoundPlain, different values of scale() have the following effects on the number 123.456:  |   |   |   |   |

## See Also

### Rounding

- [roundingMode()](foundation/nsdecimalnumberbehaviors/roundingmode().md)
