<!--
{
  "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/NumberFormatter/RoundingMode-swift.enum",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSNumberFormatterRoundingMode"
  },
  "title" : "NumberFormatter.RoundingMode"
}
-->

# NumberFormatter.RoundingMode

These constants are used to specify how numbers should be rounded. These constants are used by the [`roundingMode`](/documentation/Foundation/NumberFormatter/roundingMode-swift.property) property.

```
enum RoundingMode
```

## Topics

### Constants

[`NumberFormatter.RoundingMode.ceiling`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/ceiling)

Round towards positive infinity.

[`NumberFormatter.RoundingMode.floor`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/floor)

Round towards negative infinity.

[`NumberFormatter.RoundingMode.down`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/down)

Round towards zero.

[`NumberFormatter.RoundingMode.up`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/up)

Round away from zero.

[`NumberFormatter.RoundingMode.halfEven`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/halfEven)

Round towards the nearest integer, or towards an even number if equidistant.

[`NumberFormatter.RoundingMode.halfDown`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/halfDown)

Round towards the nearest integer, or towards zero if equidistant.

[`NumberFormatter.RoundingMode.halfUp`](/documentation/Foundation/NumberFormatter/RoundingMode-swift.enum/halfUp)

Round towards the nearest integer, or away from zero if equidistant.



---

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)