<!--
{
  "availability" : [
    "iOS: 9.0.0 -",
    "iPadOS: 9.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.11.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "GameplayKit",
  "identifier" : "/documentation/GameplayKit/GKRandomDistribution/numberOfPossibleOutcomes",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "GameplayKit"
    ],
    "preciseIdentifier" : "c:objc(cs)GKRandomDistribution(py)numberOfPossibleOutcomes"
  },
  "title" : "numberOfPossibleOutcomes"
}
-->

# numberOfPossibleOutcomes

The number of unique values the distribution can generate.

```
var numberOfPossibleOutcomes: Int { get }
```

## Discussion

When using the [`GKRandomDistribution`](/documentation/GameplayKit/GKRandomDistribution) directly, this property is determined by the [`lowestValue`](/documentation/GameplayKit/GKRandomDistribution/lowestValue) and [`highestValue`](/documentation/GameplayKit/GKRandomDistribution/highestValue) properties according to the formula `number = highest - lowest + 1`. For example, in a distribution whose lowest value is 1 and highest value is 4, the [`nextInt()`](/documentation/GameplayKit/GKRandomDistribution/nextInt()) method can return `1`, `2`, `3`, or `4`, and the [`nextUniform()`](/documentation/GameplayKit/GKRandomDistribution/nextUniform()) method can return `0.25`, `0.5`, `0.75`, or `1.0`, so the number of possible outcomes is 4.

Subclasses of [`GKRandomDistribution`](/documentation/GameplayKit/GKRandomDistribution) can alter the number of unique possible outcomes.

---

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)