---
name: "wcstod"
section: "3"
platform: "freebsd"
package: "base"
version: "16.0-CURRENT-20261027-61c70dc16a79"
release: "FreeBSD 16.0-CURRENT (2026-10-27)"
platforms: ["freebsd", "macos"]
url: "https://new.carta.tech/wcstod"
---

# wcstod(3)

convert string to float, double or long double

## NAME

**wcstof**, **wcstod**, **wcstold** – convert string to *float*, *double* or *long double*

## LIBRARY

Standard C Library (libc, -lc)

## SYNOPSIS

**#include \<wchar.h\>**

*float*\

**wcstof**(*const wchar\_t \* restrict nptr*, *wchar\_t \*\* restrict endptr*);

*long double*\

**wcstold**(*const wchar\_t \* restrict nptr*, *wchar\_t \*\* restrict endptr*);

*double*\

**wcstod**(*const wchar\_t \* restrict nptr*, *wchar\_t \*\* restrict endptr*);

## DESCRIPTION

The **wcstof**(), **wcstod**() and **wcstold**() functions are the wide-character versions of the **strtof**(), **strtod**() and **strtold**() functions. Refer to [strtod(3)](/strtod/3.md) for details.

## SEE ALSO

[strtod(3)](/strtod/3.md), [wcstol(3)](/wcstol/3.md)

## STANDARDS

The **wcstof**(), **wcstod**() and **wcstold**() functions conform to ISO/IEC 9899:1999 (“ISO C99”).
