---
title: UnitSpeed
framework: foundation
role: symbol
role_heading: Class
path: foundation/unitspeed
---

# UnitSpeed

A unit of measure for speed.

## Declaration

```swift
class UnitSpeed
```

## Overview

Overview You typically use instances of UnitSpeed to represent specific quantities of speed using the NSMeasurement class. Speed Speed is the magnitude of velocity, or the rate of change of position. Speed can be expressed by SI derived units in terms of meters per second (m/s), and is also commonly expressed in terms of kilometers per hour (km/h) and miles per hour (mph). The UnitSpeed class defines its baseUnit() as metersPerSecond, and provides the following units, which are initialized using UnitConverterLinear converters with the specified coefficients:  |  |  |   |  |  |   |  |  |   |  |  |   |  |  |  The base unit is metersPerSecond and is accessed via baseUnit() on the Dimension protocol.

## Topics

### Accessing the Base Unit

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

### Accessing Predefined Units

- [metersPerSecond](foundation/unitspeed/meterspersecond.md)
- [kilometersPerHour](foundation/unitspeed/kilometersperhour.md)
- [milesPerHour](foundation/unitspeed/milesperhour.md)
- [knots](foundation/unitspeed/knots.md)

### Initializers

- [init(forLocale:usage:)](foundation/unitspeed/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

### Time and Motion

- [UnitAcceleration](foundation/unitacceleration.md)
- [UnitDuration](foundation/unitduration.md)
- [UnitFrequency](foundation/unitfrequency.md)
