({{, (RefLink[UnitSimplify, paclet:ref/UnitSimplify])[quantity] 
attempts to simplify the units of the specified quantity.}})

OpenersNotesSection(Spacer1)Details and Options

(RefLink[UnitSimplify, paclet:ref/UnitSimplify]) will attempt to simplify a (RefLink[Quantity, paclet:ref/Quantity]) unit to an equivalent unit expression using heuristic methods.

The option (RefLink[UnityDimensions, paclet:ref/UnityDimensions]) can be used to specify which (RefLink[UnitDimensions, paclet:ref/UnitDimensions]) should be factored out during simplification.

(RefLink[UnitSimplify, paclet:ref/UnitSimplify]) accepts (RefLink[TimeSeries, paclet:ref/TimeSeries]), (RefLink[EventSeries, paclet:ref/EventSeries]), and (RefLink[TemporalData, paclet:ref/TemporalData]) inputs.

Operations involving currency units require internet connectivity.

OpenersPrimaryExamplesSection(Spacer1)Examples  (11)

OpenersExampleSection0(Spacer1)Basic Examples  (2)

Convert a (RefLink[Quantity, paclet:ref/Quantity]) of compound units to an equivalent (RefLink[Quantity, paclet:ref/Quantity]) with simpler units:

UnitSimplify[Quantity[1,("Joules"/"Seconds")]]

UnitSimplify[Quantity[1,("Seconds"^4*"Amperes"^2)/("Kilograms"*"Centimeters"^2)]]

(RefLink[UnitSimplify, paclet:ref/UnitSimplify]) will also return compound units when a single component unit is not found:

UnitSimplify[Quantity[3/4,"Kilograms"/("Volts"*"Hours")]]

OpenersExampleSection1(Spacer1)Scope  (5)

Some calculations may not automatically simplify to the unit you are expecting:

Integrate[Quantity[5,"Amperes"]*Exp[t/Quantity[τ,"Seconds"]],{t,Quantity[0,"Seconds"],Quantity[2τ,"Seconds"]}]

In such cases, (RefLink[UnitSimplify, paclet:ref/UnitSimplify]) can usually be used to obtain the desired results:

UnitSimplify[%]

Get the values from (RefLink[Quantity, paclet:ref/Quantity]) expressions in a time series:

v=Quantity[RandomReal[1,4],("Joules"/"Seconds")];
t={1, 2, 5, 10};
ts = TimeSeries[v,{t}]

ts[10]

UnitSimplify[ts]

%[10]

Use (RefLink[UnitSimplify, paclet:ref/UnitSimplify]) with (RefLink[QuantityDistribution, paclet:ref/QuantityDistribution]) specifications:

𝒟=NormalDistribution[(Quantity[120, "m" "N", meter newtons, "Meters" "Newtons"]),(Quantity[16, "m" "N", meter newtons, "Meters" "Newtons"])]

UnitSimplify[𝒟]

Use (RefLink[UnitSimplify, paclet:ref/UnitSimplify]) with (RefLink[SparseArray, paclet:ref/SparseArray]) specifications:

UnitSimplify[SparseArray[{1->(Quantity[8, "kg""/(""m" (("s")^2)")", kilograms per meter second squared, (("Kilograms")/("Meters" (("Seconds")^2)))]),2->(Quantity[7, "m" "N", meter newtons, "Meters" "Newtons"])}]]

%//Normal

Use (RefLink[UnitSimplify, paclet:ref/UnitSimplify]) with (RefLink[Association, paclet:ref/Association]) specifications:

UnitSimplify[<|"Quantity1"->(Quantity[260, "kg""/("(("s")^2)"A"")", kilograms per second squared ampere, (("Kilograms")/("Amperes" (("Seconds")^2)))]),"Quantity2"->(Quantity[3, "J""/""s", joules per second, (("Joules")/("Seconds"))])|>]

OpenersExampleSection2(Spacer1)Options  (3)

OpenersExampleSubsection0(Spacer1)UnityDimensions  (3)

(RefLink[UnitSimplify, paclet:ref/UnitSimplify]) will not automatically cancel out angle units like "AngularDegrees":

UnitSimplify[(QuantityUnitPostfix[3, "°", "per ""second", degrees per second, (("AngularDegrees")/("Seconds"))])]

(RefLink[UnityDimensions, paclet:ref/UnityDimensions]) can be used to factor out angular units:

UnitSimplify[%,UnityDimensions->{"AngleUnit"}]

Use UnityDimensions->Automatic to remove both "AngleUnit" and "SolidAngleUnit" dimensions:

UnitSimplify[Quantity[30.2, "AngularDegrees"/"Steradians"],UnityDimensions->Automatic]

(RefLink[UnityDimensions, paclet:ref/UnityDimensions]) can include any number of dimensions to factor out:

q=Quantity[14.2,"Kilograms""Meters"^2/"Seconds"^2]

UnitSimplify[q,UnityDimensions->{"MassUnit"}]

UnitSimplify[q,UnityDimensions->{"MassUnit","TimeUnit"}]

UnitSimplify[q,UnityDimensions->{"MassUnit","LengthUnit","TimeUnit"}]

OpenersExampleSection3(Spacer1)Properties & Relations  (1)

(RefLink[UnitSimplify, paclet:ref/UnitSimplify]) threads over lists:

UnitSimplify[{(Quantity[11, "s""/""F", seconds per farad, (("Seconds")/("Farads"))]),(Quantity[4, "kg" "Sv", kilogram sieverts, "Kilograms" "Sieverts"]),(Quantity[5, (("m")^2)"Pa", meter squared pascals, (("Meters")^2) "Pascals"])}]

UnitSimplify[{(Quantity[3, "F" "J", farad joules, "Farads" "Joules"]),{(Quantity[27, "Wb""/""H", webers per henry, (("Webers")/("Henries"))])},(Quantity[14, "A" "Ω", ampere ohms, "Amperes" "Ohms"])}]

({{DocumentationFooterIconsRelatedFunction.png, ({{See Also}, {(RefLink[Quantity, paclet:ref/Quantity])  ▪  (RefLink[QuantityUnit, paclet:ref/QuantityUnit])  ▪  (RefLink[UnitConvert, paclet:ref/UnitConvert])  ▪  (RefLink[UnitDimensions, paclet:ref/UnitDimensions])}})}})

({{DocumentationFooterIconsRelatedTutorial.png, ({{Tutorials}, {▪(RefLinkPlain[Units Overview, paclet:tutorial/UnitsOverview])}})}})

({{DocumentationFooterIconsRelatedGuide.png, ({{Related Guides}, {▪(RefLinkPlain[Units & Quantities, paclet:guide/Units])}, {▪(RefLinkPlain[Engineering Data, paclet:guide/EngineeringData])}, {▪(RefLinkPlain[Physics & Chemistry: Data and Computation, paclet:guide/PhysicsAndChemistryDataAndComputation])}, {▪(RefLinkPlain[Astronomical Computation & Data, paclet:guide/AstronomicalComputationAndData])}, {▪(RefLinkPlain[Probability & Statistics with Quantities, paclet:guide/ProbabilityWithQuantities])}})}})