<!--
{
  "availability" : [
    "iOS: 2.0.0 -",
    "iPadOS: 2.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSDecimalNumber/RoundingMode",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSRoundingMode"
  },
  "title" : "NSDecimalNumber.RoundingMode"
}
-->

# NSDecimalNumber.RoundingMode

These constants specify rounding behaviors.

```
enum RoundingMode
```

## Overview

The rounding mode matters only if the [`scale()`](/documentation/Foundation/NSDecimalNumberBehaviors/scale()) method sets a limit on the precision of `NSDecimalNumber` return values. It has no effect if [`scale()`](/documentation/Foundation/NSDecimalNumberBehaviors/scale()) returns `NSDecimalNoScale`. Assuming that [`scale()`](/documentation/Foundation/NSDecimalNumberBehaviors/scale()) returns 1, the rounding mode has the following effects on various original values:

|Original Value|NSRoundPlain|NSRoundDown & NS RoundUp|NSRoundBankers|
|--------------|------------|------------------------|--------------|
|1.24          |1.2         |1.2 & 1.3               |1.2           |
|1.26          |1.3         |1.2 & 1.3               |1.3           |
|1.25          |1.3         |1.2 & 1.3               |1.2           |
|1.35          |1.4         |1.3  & 1.4              |1.4           |
|–1.35         |–1.4        |–1.4  & -1.3            |–1.4          |

## Topics

### Constants

[`NSDecimalNumber.RoundingMode.plain`](/documentation/Foundation/NSDecimalNumber/RoundingMode/plain)

Round to the closest possible return value; when caught halfway between two positive numbers, round up; when caught between two negative numbers, round down.

[`NSDecimalNumber.RoundingMode.down`](/documentation/Foundation/NSDecimalNumber/RoundingMode/down)

Round return values down.

[`NSDecimalNumber.RoundingMode.up`](/documentation/Foundation/NSDecimalNumber/RoundingMode/up)

Round return values up.

[`NSDecimalNumber.RoundingMode.bankers`](/documentation/Foundation/NSDecimalNumber/RoundingMode/bankers)

Round to the closest possible return value; when halfway between two possibilities, return the possibility whose last digit is even.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)