---
title: UnitTemperature
framework: foundation
role: symbol
role_heading: Class
path: foundation/unittemperature
---

# UnitTemperature

A unit of measure for temperature.

## Declaration

```swift
class UnitTemperature
```

## Overview

Overview You typically use instances of UnitTemperature to represent specific quantities of temperature using the NSMeasurement class. Temperature Temperature is a comparative measure of thermal energy. The SI unit for temperature is the kelvin (K), which is defined in terms of the triple point of water. Temperature is also commonly measured by degrees of various scales, including Celsius (°C) and Fahrenheit (°F). The UnitTemperature class defines its baseUnit() to be kelvin, and provides the following units, which are initialized using UnitConverterLinear converters with the specified coefficients and constants:  |  |  |  |   |  |  |  |   |  |  |  |   |  |  |  |

## Topics

### Accessing the Base Unit

- [baseUnit()](foundation/dimension/baseunit().md)

### Accessing Predefined Units

- [kelvin](foundation/unittemperature/kelvin.md)
- [celsius](foundation/unittemperature/celsius.md)
- [fahrenheit](foundation/unittemperature/fahrenheit.md)

### Initializers

- [init(forLocale:usage:)](foundation/unittemperature/init(forlocale:usage:).md)

## Relationships

### Inherits From

- [Dimension](foundation/dimension.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)
- [Sendable](swift/sendable.md)
- [SendableMetatype](swift/sendablemetatype.md)

## See Also

### Energy, Heat, and Light

- [UnitEnergy](foundation/unitenergy.md)
- [UnitPower](foundation/unitpower.md)
- [UnitIlluminance](foundation/unitilluminance.md)
