---
title: numericValue
framework: swift
role: symbol
role_heading: Instance Property
path: swift/unicode/scalar/properties-swift.struct/numericvalue
---

# numericValue

The numeric value of the scalar.

## Declaration

```swift
var numericValue: Double? { get }
```

## Discussion

Discussion For scalars that represent a numeric value, numericValue is the whole or fractional value. For all other scalars, this property is nil. let scalars: [Unicode.Scalar] = ["4", "④", "⅕", "X"] for scalar in scalars {     print(scalar, "-->", scalar.properties.numericValue) } // 4 --> Optional(4.0) // ④ --> Optional(4.0) // ⅕ --> Optional(0.2) // X --> nil This property corresponds to the “Numeric_Value” property in the Unicode Standard.
