<!--
{
  "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

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

Round towards positive infinity.

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

Round towards negative infinity.

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

Round towards zero.

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

Round away from zero.

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

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

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

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

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

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

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`RawRepresentable`](/documentation/Swift/RawRepresentable)

[`Sendable`](/documentation/Swift/Sendable)

[`BitwiseCopyable`](/documentation/Swift/BitwiseCopyable)

[`Equatable`](/documentation/Swift/Equatable)

[`Hashable`](/documentation/Swift/Hashable)

---

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)