<!--
{
  "availability" : [
    "iOS: 11.2.0 - 18.0.0",
    "iPadOS: 11.2.0 - 18.0.0",
    "macCatalyst: 13.1.0 - 18.0.0",
    "macOS: 10.13.2 - 15.0.0",
    "tvOS: 11.2.0 - 18.0.0",
    "visionOS: 1.0.0 - 2.0.0",
    "watchOS: 6.2.0 - 11.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "StoreKit",
  "identifier" : "/documentation/StoreKit/SKProductDiscount/numberOfPeriods",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "StoreKit"
    ],
    "preciseIdentifier" : "c:objc(cs)SKProductDiscount(py)numberOfPeriods"
  },
  "title" : "numberOfPeriods"
}
-->

# numberOfPeriods

An integer that indicates the number of periods the product discount is available.

```
var numberOfPeriods: Int { get }
```

## Discussion

A product discount may be available for one or more periods. The period, defined in [`subscriptionPeriod`](/documentation/StoreKit/SKProductDiscount/subscriptionPeriod), is a set number of days, weeks, months, or years.

The total length of time that a product discount is available is calculated by multiplying the [`numberOfPeriods`](/documentation/StoreKit/SKProductDiscount/numberOfPeriods) by the period.

Note that the discount period is independent of the product subscription period.

---

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)