# Converting to base SI units with Unitful.jl

**URL:** <https://discourse.julialang.org/t/converting-to-base-si-units-with-unitful-jl/15277>\
**Category:** General Usage\
**Tags:** unitful\
**Created:** [September 21, 2018, 1:57pm UTC](https://discourse.julialang.org/t/converting-to-base-si-units-with-unitful-jl/15277 "2018-09-21T13:57:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Post date:** [September 21, 2018, 1:57pm UTC](https://discourse.julialang.org/t/converting-to-base-si-units-with-unitful-jl/15277/1 "2018-09-21T13:57:17Z")

</div>

I’m trying to figure out if its possible to convert dimensions to base SI units using Unitful without explicitly specifying the base unit.

Right now I do:

```julia
a = 800.0u"ft/s" |> u"m/s" 
b = 50.0u"cm^2" |> u"m^2"

```

Edit: accidentally submitted prior to finishing post…

---

<div class="post-metadata">

**Author:** ![non-Jedi](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/non-jedi/32/3645_2.png) [@non-Jedi](https://discourse.julialang.org/u/non-Jedi)\
**Post date:** [September 21, 2018, 2:03pm UTC](https://discourse.julialang.org/t/converting-to-base-si-units-with-unitful-jl/15277/2 "2018-09-21T14:03:03Z")

</div>

I believe `upreferred(800u"ft/s")` should do what you want. Glancing through the hosted documentation for Unitful, it doesn’t seem like this is made explicitly clear anywhere. Perhaps a PR is in order?

---

<div class="post-metadata">

**Author:** ![DrPapa](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/drpapa/32/6835_2.png) [@DrPapa](https://discourse.julialang.org/u/DrPapa)\
**Post date:** [September 21, 2018, 5:43pm UTC](https://discourse.julialang.org/t/converting-to-base-si-units-with-unitful-jl/15277/3 "2018-09-21T17:43:14Z")

</div>

`upreferred` does the trick. Thanks. I agree with your comment about the documentation.
