# Parse Number

### What It Does

The Parse Number node converts a string representation of a number into an actual number value. If the conversion fails (resulting in NaN), the node throws an error.

### Inputs

| Name  | Description                       | Type   | Required |
| ----- | --------------------------------- | ------ | -------- |
| Value | The string to convert to a number | String | Yes      |

### Outputs

| Name  | Description                | Type   |
| ----- | -------------------------- | ------ |
| Value | The converted number value | Number |

![Parse Number Example](https://3657049418-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fy0SFXZjN1sdgdxYM7QPE%2Fuploads%2FySFGcJZcyBHoUst5bDg2%2FScreenshot%202025-04-22%20at%205.56.46%E2%80%AFPM.png?alt=media\&token=9ff6e529-3f6d-4f99-befa-3826e2eb7f3e)

### How to Use It

1. Drag the Parse Number node into your graph.
2. Connect a string value to the "Value" input.
3. The node attempts to convert the string to a number.
4. If successful, the number is output.
5. If the string cannot be parsed as a number, an error is thrown.

### Tips

* This node is stricter than JavaScript's built-in parsing as it throws an error on invalid input.
* Use this node when you need to ensure numerical operations will work correctly.
* Consider using a Try/Catch node to handle potential parsing errors gracefully.

### See Also

* **Parse unit**: For extracting both the number and unit from a value.
* **Pass unit**: For adding a unit to a number.
* **Number To String**: For converting in the opposite direction.

### Use Cases

* **User Input Validation**: Convert user-provided string inputs to numbers for calculations.
* **Data Cleaning**: Ensure values from external sources are proper numbers before processing.
* **Configuration Parameter Processing**: Convert string configuration values to numbers for use in calculations.
