> For the complete documentation index, see [llms.txt](https://documentation.soulver.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.soulver.app/syntax-reference/units-and-conversions/units.md).

# Converting Units

Use `to` or `in` or `as` to convert into a particular unit.

```
10 km in m                    | 10,000 m
5 hours 30 minutes to seconds | 19,800 seconds
100 pounds in kg              | 45.36 kg
```

Or alternatively:

```
meters in 10 km  | 10,000 m
days in 3 weeks  | 21 days
seconds in a day | 86,400 s
```

{% hint style="success" %}
As a shorthand, you can also type two unit names without values to see the conversion:

"km m" (= 1,000 m)
{% endhint %}

Use `cast` to change the unit without changing the number: `5 km cast miles` → **5 mi**.

For astronomical coordinates, one hour corresponds to 15°: `12h 30m in degrees` → **187.5°**, and `90 degrees in hours` → **6h 0m 0s**.

Soulver uses unit symbols (rather than its full name) in the answer column.

Control-click on an answer to see the full unit name

![](https://1915029247-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-Lf0gWBnuB8M1SitWhyk%2Fuploads%2FxSjIua2bsruFuAFT5yct%2Fimage.png?alt=media\&token=1ec1cca8-bf7b-486e-9a58-1fe9b0a1aa5d)

### Pixels and screen density

To convert between pixels and physical measurements, specify the screen density in pixels per inch (`ppi`):

`1 cm in px at 326 ppi` → **128.35 px**

The same physical length contains more pixels on a higher-density screen.

## Notes on Units

#### **Mixing Units & Plain Numbers**

When mixing plain numbers with units, the nearest unit will be used automatically. This is called **unit assimilation**.

```
300 + 20 km | 320 km
$20 + 30    | $50.00
```

#### **Adding & Subtracting Mixed Units**

When doing calculations with mixed unit types, **the larger unit wins**:

```
1km + 1,000m | 2 km
```

When units don’t share a common base unit, the **last used unit wins:**

```
$200 + €200 | €308.84
```

#### **Multiplying Units**

Soulver only supports units that have been pre-defined in its math engine, not compound units that do "not exist":

```
10m × 10m       | 100 m² // area, a supported unit type
3 kg × 3 liters | // Not "9 kg liters", this unit does not exist
```

Soulver will make an implicit rate when a supported unit cannot be created through multiplication:

```
$30 × 4 days | $120.00
// the above is interpreted as $30/day × 4 days
```

#### **Creating Custom Units**

You can create custom units in the **definition sheet** and use them across all your sheets and Soulver files.

On Mac, open **Settings > Units** and click **Edit Definition Sheet…**.

Define a unit in terms of an existing unit:

`1 watermelon = 20 lb`

Then use it in calculations: `40 lb in watermelons` → **2 watermelons**. English plural forms are recognized automatically.

You can also create a new unit type:

`operation = new unit`

Then `3 operations/second × 5 minutes` → **900 operations**.
