Thanks for all the input these past few days! I’ve added a few big updates to the beta, and there’ll be more coming based on your suggestions:

Currency conversion

You can now use currencies via their 3-letter abbreviations: For example:

  • 50,000 USD in EUR = 37,967.95 EUR
  • 3 USD/ft in EUR/m = 7.47 EUR/m
  • 300 USD/day in JPY/week = 251,118 JPY/week

I get the rates from the New York Federal Bank, which lists over 20 major currencies. If yours is missing and you know a good data source, let me know.

When dealing with money the standard disclaimer applies: There may be errors and the data is delayed. Use this as a rough tool, but check with your banker before making investments, ok?

Flexible units: inverted and scaled

You can now write and reorder units, rather than being restriced to “1″ of something. Let’s say you ran 3 miles in 28 minutes. What’s your speed in mph?

  • 3 miles/28 minutes in mph = 6.42 mph

Easy! You can even write it the other way around (inverted) and InstaCalc will figure it out:

  • 28 minutes/3 miles in mph

Not bad, eh? Now let’s figure out your gas usage over a long trip:

  • 450 miles/24 gallons in mpg = 18.75 mpg

A helpful user left a comment that outside the US, efficiency is often measured in liters per 100km. Instead of saying “How far can I go on a single gallon?” they ask “How many liters does it take to go 100km?” This conversion is no problem:

  • 18.75 mpg in liters/100km = 12.54 liters/100km

This example inverts the unit and scales it into units of 100km. Fun stuff.

And of course, you can always use your own units (who else lets you do that?). Suppose you harvest 50 apples a day; how many weeks until you get 1000 apples?

  • 50 apples/day in weeks/1000 apples = 2.85 weeks/1000 apples

It’s about 3 weeks to meet your goal. But enough reading, check out the beta and let me know what you think!

PS. Geeky notes for developers

Importing currency data was a great way to learn about JSON and XML conversion. This opens up the door to other data feeds inside InstaCalc - ideas and suggestions are welcome.

5 Responses to “Currency conversions and flexible units”

  1. Using JSON to Exchange Data | BetterExplained Says:

    […] I recently added currency conversion to the InstaCalc Online Calculator, which was a good lesson in importing data: […]

  2. Ken Close Says:

    Hmmmm?? Wrote Dia = 75 cm, then next row wrote Cir = Dia * PI in feet and got nothing. Now what I expected. What would be the syntax for calculating a circumference in feet from a dia in cm?

  3. kalid Says:

    Hi Ken, in this example you’d have to write something like this:

    Dia = 75 cm
    Cir = (Dia * PI) cm in feet

    http://tinyurl.com/2et236

    Given the way unit conversion works, you have the explicitly specify the to and from units (and use parens if you have an operation). I have some ideas on how to streamline this process for future builds.

    Thanks for writing!

  4. Ray Says:

    Hi Kalid,

    Just a “heads-up” ref: Currency Conversions,
    using the NY FED site -
    http://www.newyorkfed.org/markets/fxrates/noon.cfm

    As of:
    DEC 31, 2008
    the NY FED site will not publish these rates anymore.

    Just trying to help you find an alternative source site, with plenty of time… :-)

    RAY

  5. kalid Says:

    Hi Ray, thanks for the info! I was wondering how long the free ride would last, now I’ll have to start digging for another source.

    Appreciate the tip :) .

Leave a Reply