# Convert mass

## Description

This operation converts values between different units of mass.

***

## Data types

These are the input/output expected data types for this operation:

### Input data

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FZmr35bwgundYfOW63E3q%2Fimage.png?alt=media\&token=2ba8baff-b40b-4dd4-ae2c-2a2ad5696788) - Values whose unit of mass you want to transform. They must be strings representing numbers.

### Output data <a href="#output-data" id="output-data"></a>

![](https://965373739-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkxZeV4nlXcIAjMGZxzLI%2Fuploads%2FRDngsaxu99O216cFqn81%2Fimage.png?alt=media\&token=53e171be-7591-4c56-acdb-4e8e8646241d) - Resulting values after transforming them to the selected unit of mass.

***

## Parameters

These are the parameters you need to configure to use this operation (mandatory parameters are marked with a <mark style="color:red;">**\***</mark>):

<details>

<summary>Input units<mark style="color:red;"><strong>*</strong></mark></summary>

Enter the unit of mass of your input data. You must indicate one of the following:

**Metric**

* `Yoctogram (yg)`
* `Zeptogram (zg)`
* `Attogram (ag)`
* `Femtogram (fg)`
* `Picogram (pg)`
* `Nanogram (ng)`
* `Microgram (μg)`
* `Milligram (mg)`
* `Centigram (cg)`
* `Decigram (dg)`
* `Gram (g)`
* `Decagram (dag)`
* `Hectogram (hg)`
* `Kilogram (kg)`
* `Megagram (Mg)`
* `Tonne (t)`
* `Gigagram (Gg)`
* `Teragram (Tg)`
* `Petagram (Pg)`
* `Exagram (Eg)`
* `Zettagram (Zg)`
* `Yottagram (Yg)`

**Imperial Avoirdupois**

* `Grain (gr)`
* `Dram (dr)`
* `Ounce (oz)`
* `Pound (lb)`
* `Nail`
* `Stone (st)`
* `Quarter (qr)`
* `Tod`
* `US hundredweight (cwt)`
* `Imperial hundredweight (cwt)`
* `US ton (t)`
* `Imperial ton (t)`

**Imperial Troy**

* `Grain (gr)`
* `Pennyweight (dwt)`
* `Troy dram (dr t)`
* `Troy ounce (oz t)`
* `Troy pound (lb t)`
* `Mark`

**Archaic**

* `Wey`
* `Wool wey`
* `Suffolk wey`
* `Wool sack`
* `Coal sack`
* `Load`
* `Last`
* `Flax or feather last`
* `Gunpowder last`
* `Picul`
* `Rice last`

**Comparisons**

* `Big Ben (14 tonnes)`
* `Blue whale (180 tonnes)`
* `International Space Station (417 tonnes)`
* `Space Shuttle (2,041 tonnes)`
* `RMS Titanic (52,000 tonnes)`
* `Great Pyramid of Giza (6,000,000 tonnes)`
* Earth's oceans (1.4 yottagrams)

**Astronomical**

* `A teaspoon of neutron star (5,500 million tonnes)`
* `Lunar mass (ML)`
* `Earth mass (M⊕)`
* `Jupiter mass (MJ)`
* `Solar mass (M☉)`
* `Sagittarius A* (7.5 x 10^36 kgs-ish)`
* `Milky Way galaxy (1.2 x 10^42 kgs)`
* `The observable universe (1.45 x 10^53 kgs)`

</details>

<details>

<summary>Output units<mark style="color:red;"><strong>*</strong></mark></summary>

Enter the required unit of mass of your output data. You must indicate one of the following:

**Metric**

* `Yoctogram (yg)`
* `Zeptogram (zg)`
* `Attogram (ag)`
* `Femtogram (fg)`
* `Picogram (pg)`
* `Nanogram (ng)`
* `Microgram (μg)`
* `Milligram (mg)`
* `Centigram (cg)`
* `Decigram (dg)`
* `Gram (g)`
* `Decagram (dag)`
* `Hectogram (hg)`
* `Kilogram (kg)`
* `Megagram (Mg)`
* `Tonne (t)`
* `Gigagram (Gg)`
* `Teragram (Tg)`
* `Petagram (Pg)`
* `Exagram (Eg)`
* `Zettagram (Zg)`
* `Yottagram (Yg)`

**Imperial Avoirdupois**

* `Grain (gr)`
* `Dram (dr)`
* `Ounce (oz)`
* `Pound (lb)`
* `Nail`
* `Stone (st)`
* `Quarter (qr)`
* `Tod`
* `US hundredweight (cwt)`
* `Imperial hundredweight (cwt)`
* `US ton (t)`
* `Imperial ton (t)`

**Imperial Troy**

* `Grain (gr)`
* `Pennyweight (dwt)`
* `Troy dram (dr t)`
* `Troy ounce (oz t)`
* `Troy pound (lb t)`
* `Mark`

**Archaic**

* `Wey`
* `Wool wey`
* `Suffolk wey`
* `Wool sack`
* `Coal sack`
* `Load`
* `Last`
* `Flax or feather last`
* `Gunpowder last`
* `Picul`
* `Rice last`

**Comparisons**

* `Big Ben (14 tonnes)`
* `Blue whale (180 tonnes)`
* `International Space Station (417 tonnes)`
* `Space Shuttle (2,041 tonnes)`
* `RMS Titanic (52,000 tonnes)`
* `Great Pyramid of Giza (6,000,000 tonnes)`
* Earth's oceans (1.4 yottagrams)

**Astronomical**

* `A teaspoon of neutron star (5,500 million tonnes)`
* `Lunar mass (ML)`
* `Earth mass (M⊕)`
* `Jupiter mass (MJ)`
* `Solar mass (M☉)`
* `Sagittarius A* (7.5 x 10^36 kgs-ish)`
* `Milky Way galaxy (1.2 x 10^42 kgs)`
* `The observable universe (1.45 x 10^53 kgs)`

</details>

***

## Example

Suppose you want to convert a series of events from **kilograms** into **pounds**:

1. In your Pipeline, open the required [Action](https://docs.onum.com/the-workspace/pipelines/actions) configuration and select the input **Field**.
2. In the **Operation** field, choose **Convert mass**.
3. Set **Input units** to `Kilogram (kg)`.
4. Set **Output units** to `Pound (lb)`.
5. Give your **Output field** a name and click **Save**. The unit of mass of the values in your input field will be transformed. For example:

```
Input data - "100"

Input units - "Kilogram (kg)"

Output units - "Pound (lb)"

Output data - "220.4622622"
```

{% hint style="info" %}
You can try out operations with specific values using the **Input** field above the operation. You can enter the value in the example above and check the result in the **Output** field.
{% endhint %}
