<!--
{
  "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/CalculationError",
  "metadataVersion" : "0.1.0",
  "role" : "Enumeration",
  "symbol" : {
    "kind" : "Enumeration",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:@E@NSCalculationError"
  },
  "title" : "NSDecimalNumber.CalculationError"
}
-->

# NSDecimalNumber.CalculationError

Calculation error constants used to describe an error in [`exceptionDuringOperation(_:error:leftOperand:rightOperand:)`](/documentation/Foundation/NSDecimalNumberBehaviors/exceptionDuringOperation(_:error:leftOperand:rightOperand:)).

```
enum CalculationError
```

## Topics

### Constants

[`NSCalculationNoError`](/documentation/Foundation/NSDecimalNumber/CalculationError/noError)

No error occurred.

[`NSCalculationLossOfPrecision`](/documentation/Foundation/NSDecimalNumber/CalculationError/lossOfPrecision)

The number can’t be represented in 38 significant digits.

[`NSCalculationOverflow`](/documentation/Foundation/NSDecimalNumber/CalculationError/overflow)

The number is too large to represent.

[`NSCalculationUnderflow`](/documentation/Foundation/NSDecimalNumber/CalculationError/underflow)

The number is too small to represent.

[`NSCalculationDivideByZero`](/documentation/Foundation/NSDecimalNumber/CalculationError/divideByZero)

The caller tried to divide by `0`.

## Relationships

### Conforms To

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

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

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

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

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

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

---

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)