<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 8.0.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/pow(_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation3powySo9NSDecimalaAD_SitF"
  },
  "title" : "pow(_:_:)"
}
-->

# pow(_:_:)

Returns a decimal number raised to a given power.

```
func pow(_ x: Decimal, _ y: Int) -> Decimal
```

## Parameters

`x`

A decimal value.

`y`

The power by which to raise `x`.

## Return Value

The result of raising `x` to the power of `y`.

## Discussion

If the result of this operation requires more precision than the `Decimal` type can provide, the result is rounded using the [`NSDecimalNumber.RoundingMode.plain`](/documentation/Foundation/NSDecimalNumber/RoundingMode/plain) rounding mode. To specify a different rounding mode, use the [`NSDecimalPower(_:_:_:_:)`](/documentation/Foundation/NSDecimalPower(_:_:_:_:)) function instead.

---

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)