<!--
{
  "availability" : [
    "iOS: 15.0.0 -",
    "iPadOS: 15.0.0 -",
    "macCatalyst: 15.0.0 -",
    "macOS: 12.0.0 -",
    "tvOS: 15.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 8.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/Measurement/formatted()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "s:10Foundation11MeasurementVAASo11NSDimensionCRbzrlE9formattedSSyF"
  },
  "title" : "formatted()"
}
-->

# formatted()

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

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

## Return Value

A string, formatted according to the default style.

## Discussion

Use the [`formatted()`](/documentation/Foundation/Measurement/formatted()) method to apply the default format style to a measurement, such as in the following example:

```swift
let string = Measurement<UnitTemperature>(value: 38, unit: .celsius).formatted()
// For locale: en_US: 100.4°F
```

The default measurement format style uses an [`abbreviated`](/documentation/Foundation/Measurement/FormatStyle/UnitWidth/abbreviated) unit width, the general usage type, and the default number format style. To customize the formatted measurement string, use the [`formatted(_:)`](/documentation/Foundation/Measurement/formatted(_:)) method and include a [`Measurement.FormatStyle`](/documentation/Foundation/Measurement/FormatStyle).

---

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)