---
title: "pow(_:_:)"
framework: foundation
role: symbol
role_heading: Function
path: "foundation/pow(_:_:)"
---

# pow(_:_:)

Returns a decimal number raised to a given power.

## Declaration

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

## Parameters

- `x`: A decimal value.
- `y`: The power by which to raise x.

## Return Value

Return Value The result of raising x to the power of y.

## Discussion

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 rounding mode. To specify a different rounding mode, use the NSDecimalPower(_:_:_:_:) function instead.
