---
title: formatted()
framework: foundation
role: symbol
role_heading: Instance Method
path: foundation/measurement/formatted()
---

# formatted()

Generates a locale-aware string representation of a measurement using the default measurement format style.

## Declaration

```swift
func formatted() -> String
```

## Return Value

Return Value A string, formatted according to the default style.

## Discussion

Discussion Use the formatted() method to apply the default format style to a measurement, such as in the following example: let string = Measurement<UnitTemperature>(value: 38, unit: .celsius).formatted() // For locale: en_US: 100.4°F The default measurement format style uses an abbreviated unit width, the general usage type, and the default number format style. To customize the formatted measurement string, use the formatted(_:) method and include a Measurement.FormatStyle.

## See Also

### Formatting a Measurement

- [formatted(_:)](foundation/measurement/formatted(_:).md)
- [Measurement.FormatStyle](foundation/measurement/formatstyle.md)
- [Measurement.AttributedStyle](foundation/measurement/attributedstyle.md)
