On my website / app I am currently using miles only to designate distances, and some European users have asked for the ability to have it use kilometers instead, as they are not very familiar with miles.

I was initially going to add a setting to their account settings page that lets them toggle between miles and kilometers, but then I had the realization that an IP address location lookup is accurate for countries >99% of the time.

Would it be preferable to instead just look up their country by their IP address and then serve them either miles or kilometers based on their country, as opposed to requiring the user to finding the setting in their settings and then flipping it there?

Considering the only countries that use miles are basically the US, UK, Liberia, and some other small ones (<1 million people), I'm thinking that maybe I should just set the default to KM and then have it automatically flipped to miles if they are from one of those countries.

I imagine a potential answer to this question might be "set the default based on their country, but still give them the option", but that is still adding to the UI complexity by including it. Is it worth it for it to still be in the UI if this solution would fail for less than 1% of the users?

1 Answer 1


I agree, "set the default based on their country, but still give them the option" would be also my preferred solution.

Consider this, users might

  • travel in a different country or
  • use a os with a different language setting (if you plan on using that) or
  • use a vpn to browse the web securely appearing to come from a different location

Also, the IP tracing will never be 100% accurate.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.