<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreFoundation",
  "identifier" : "/documentation/CoreFoundation/CFNumberGetByteSize(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Foundation"
    ],
    "preciseIdentifier" : "c:@F@CFNumberGetByteSize"
  },
  "title" : "CFNumberGetByteSize(_:)"
}
-->

# CFNumberGetByteSize(_:)

Returns the number of bytes used by a CFNumber object to store its value.

```
func CFNumberGetByteSize(_ number: CFNumber!) -> CFIndex
```

## Parameters

`number`

The CFNumber object to examine.

## Return Value

The size in bytes of the value contained in `number`.

## Discussion

Because a CFNumber object might store a value using a type different from that of the original value with which it was created, this function may return a size different from the size of the original value’s type.

---

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)