InstaCalc examples on BetterExplained
February 12th, 2007
I’m always looking for ways to get interactive calculations into the real world. I’ve started a blog at http://betterexplained.com, as a way to share the hard-fought insights I’ve managed to stumble upon. Here are two articles that benefit from having linked or embedded calculations:
In my ideal world, every calculation in a paper or tutorial would have a footnote so readers could play with the numbers themselves. Much of my learning has come from experimenting on my own, rather than only using the stock examples listed in the textbook.
InstaCalc Gadget Released!
January 26th, 2007
I’ve had a few requests for a google gadget, and I’m happy to say they are on the way. Check out the first prototype:
It’s on a single, wide line so you can type longer equations (more lines can be added). You can also save a permalink to any of your calculations for easy sharing. And of course, all the same features work, like “3 million” or “speed = mph * hours”.
Try it out and let me know what you think. I’m planning on a version that mimics the regular look as well, with answers and results side-by-side and scaled to fit better inside a smaller window.
Installation: Click here to add to Google Personal Homepage
Currency conversions and flexible units
January 5th, 2007
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.
InstaCalc Holiday Special (Part 2)
December 24th, 2006
A new release for the holidays with some experimental features: http://instacalc.com/beta


1. Command bar to show available functions: Use the drop-down to browse and insert any commands you need.
2. Scratchpad view: An experiment where calc meets notepad. Just write text and the results appear alongside. From initial thoughts it changes the look quite a bit, so may not be the default. Still, it’s really useful for copying/pasting text around.
3. Table view: Paste data into your email, Word, or Excel (columns are preserved). This will be the basis for a print-friendly view.
And last but not least: Unit conversions
Get instant, real-time conversions in the style of Google calculator. Even better, you can use your own units, which are ignored but useful for readability. Let’s say you run an orchard making 5 apples/day (pretty small, I know). To find your yearly output you’d write:
- 5 apples/day in apples/year = 1,826 apples/year
Now let’s say you want to produce 1000 apples/year. How many apples per day do you need?
- 1000 apples/year in apples/day = 2.737 apples/day
Pretty sweet, eh? Try out these other conversions (copy & paste into the scratchpad):
15 mpg in km/liter
.002 cents/kb in dollars/mb
150 gallons/sec in liters/minute
150 lbs in kg
1 acre in m^2
3 dollars/week in dollars/year
But wait, there’s more! You can even include units when assigning variables. The units are politely ignored, but can help readability:
speed = 15 mph
2 * speed
One caveat
The “save link” in the beta is purposefully disabled, and points to the main site. The beta behavior / layout may change and I don’t want your links to behave strangely. The new features will be on the main site soon enough.
Gimme gimme gimme… feedback
I’m taking a break for the holidays, will let the beta bake, take in feedback, squash bugs and update the documentation. After that, the changes will appear on the main site early next year. Try out the beta and let me know what you think!
New Features! (Part 1)
December 10th, 2006
I have a bunch of new features to announce, thanks again for the feedback (and for those I still haven’t replied to, I’ll get there soon). I wanted to release this earlier, but I had so many new pieces that I hesitated to change one section for fear of harming the others. There’s a lot of lessons to learn, which I’ll write about in the future.
Now for the fun part – here’s what you get in the first wave of features:
New Calculator Features
- Easy percents. Write “100 + 10%” to get 110. You can even do combinations: “150 – 25% + 5%” would be a 25% discount followed by a 5% sales tax. Cool, huh?
- Easy exponents. Finally, you can write “5^2″ as you’d expect, rather than Excel-style “power(5:2)” which was quite ugly.
- Factorial. Write “3!” to get 6 (3 * 2 * 1).
- Easy Currency formatting. Write “$3″ and it becomes “$3.00″. Put a “$” in your equation to format as currency: “$5/3 = $1.67″
- Create binary numbers with “0b101010″. Write octal with “0o567″.
- Easier trigonometry. Degrees are on by default: “sin(30)” is in degrees. If you want radians, write “sin(30 rad)”. My current philosophy is no settings, so no deg/rad button. Just write “rad” if you mean radians.
- Easier logarithms. Use ln(x) [natural log] and log(x) [log base 10].
- Unicode support in the descriptions – save a note in Japanese!
- Nicer reference section that is much easier to read and loaded with examples.
- Create Shorter URLs with TinyURL integration in the save button.
- Prettier notes that look like a yellow post-it. Notes don’t seem to be widely used and are now hidden by default.
- Moved to Amazon S3 for file hosting (this should hopefully make things faster – we’ll see).
- Better formatting for binary, hex and octal numbers: they are printed with their prefix (0b, 0o, 0x) when you use bin(), hex() or oct().
- Better errors for undefined variables.
Easier Embedding
- HTML-only embed, for websites that do not support Javascript
- Editable height and width for the widget
- Simpler Javascript that has no newlines, making it easier for blogs to use (some blogs would format the newlines and not load the script)
And for those prone to typos:
- Autofix spacing errors. “123 456″ becomes “123,456″
- Autofix Excel syntax. InstaCalc recognizes “=3 * 4″ and “3 * 4 =”. Even though Excel conditioned you to put the equals sign in the wrong place, I like you anyway.
Ok, that’s it for the first wave. The next feature release will have a nice surprise
10-day recap: Taking in Features
November 14th, 2006
Thanks for all the suggestions and feature requests over these past few days – feedback is how any project improves. As new comments come in, my brain buzzes with questions:
- How easy is it to build?
- How useful is it?
- How easy is it to use?
- Does it make sense for the site?
On the surface, you could argue that any easy feature should be built, with a user option to enable/disable it. Unfortunately, that itself is a feature – the feature of throwing options in the face of the user.
The hard part of design it taking care of the details. I’m not an expert, and this site is a constant learning process. I’ll make mistakes and I’ll also learn from them. My current design approach is to minimize the number of decisions put before you. Every option is a potential chance for misconfiguration or confusion, so the feature really must be worthwhile. And if the feature is so essential, why have the option to disable it?
That aside, I’ve been working on many quick fixes and adjustments which I’ll roll out soon after testing (today or the day afterwards). As always, I appreciate the comments, feel free to send more. It might take me a while to get back to you but I’ll do my best.
UPDATE (11/18): As with many software projects, a few features are taking a bit longer than expected. Hang with me here, I think you’ll agree it is worth the wait
Welcome TechCrunchers, Delicious Users, Bloggers…
November 2nd, 2006
…Wow. I didn’t expect such an overwhelming response to the initial release, and I’m really happy that people are finding it useful. I want calculations to be easily created and easily shared, and from the feedback I’ve been getting I think we’re getting closer to that goal.
That said, there may be such a thing as too much sharing
. My web server is no match for a simultaneous assault from various sources – I’ve done what I can to offload scripts to other sites, but the flood keeps coming! Right now it’s about 1000 users an hour and rising, and each user hits the site with multiple page views.
If you are using the widget and are experiencing any slowdown on your site, feel free to disable it or replace it with the regular permalink (just use the “save link” button). Now that the widget proof-of-concept is working correctly, I’m looking into other platforms (such as Google Gadgets) and hosting options to ensure a high quality of service. This is the initial release, and as such I’ll do my best to keep the site up as much as possible.
Thank you again for all the warm responses! It has made my day (week, month, year) to create something people are finding genuinely useful. As always, feel free to provide feedback on what you think about the site.
-Kalid
UPDATE: I contacted my web host and it turns out I had hit the max # of processes allowed in apache (20). This was bumped up, and the site should be more responsive now.
Btw, my host – rimuhosting – was awesome during this. After my email they took a look at the machine, isolated and resolved the issue, and explained the troubleshooting steps along the way. I love the teach-a-man-to-fish approach, and though I’m not an ops guy, I may be able to resolve future traffic spikes more easily.
InstaCalc Example: YouTube Analysis
November 1st, 2006
I developed InstaCalc while the YouTube acquisition was happening. It was a great chance to try out a key scenario where numbers need to be shared:
- Fred Wilson blogs about YouTube's potential revenue. He invites readers to play with his assumptions.
- I left a comment with an InstaCalc calculation containing his results, allowing others to link to or edit his analysis.
- A French blogger changes the assumptions for his own calculation.
- Paul Kedrosky writes an article about YouTube takeaways, showing readers where they can play with a nice online calculator.
- Gagglescape links to the InstaCalc calculation, allowing readers to see the details of the financial analysis.
The goal of InstaCalc is to make calculations easy: creating, editing and sharing without a hassle. I'm really happy that people found the site useful and easy to link to, and the ongoing feedback helped me create an embeddable version, here:
Now you can see one model of the YouTube valuation. Do you agree with the numbers?
InstaCalc Widget/Gadget/Shmudgit
October 20th, 2006
I'm currently looking into ways to create InstaCalc widgets/gadgets/plugins (you know what I mean) for your website. There's a bunch of platforms out there:
- Google Gadgets
- Windows Live Gadgets
- Embed object tags like YouTube. I previously made a simple version to do this, and want to see if there's a better platform.
- Plain ol' static HTML to stick onto your site: fast and simple.
I'm a newcomer to this space and will be researching the various options - I'd love to hear any experiences (good or bad) that people have had in this area.
Sure, the easy answer is to "build 'em all!" but time and energy are usually finite resources.
UPDATE (10/30): Embeddable InstaCalc is alive! Click the "embed" link on any page for the code you need and a live preview. Here's an example BMI calculation.
I've chosen option E), none of the above. I decided to build a system in the style of adwords: a bit of JavaScript that you insert into your site, something like this (script tags intentionally broken):
<scrip t>
instacalc_embed_url = 'http://instacalc.com/?d=blah...';
instacalc_embed_height = 300;
</scrip t>
<scrip t src="http://instacalc.com/javascripts/embed.js"></scrip t>
Here's why I went with this approach:
- Entirely updateable on the backend. If there are any bugs in the layout, I can fix it on my end.
- Including script tags should be familiar to any Adwords user. Also, the code is smaller since there aren't table tags, etc.
- If InstaCalc is down, the script will not be loaded and nothing will be added to the page. This feature was key - including an IFrame or Object directly could have bad consequences if the site was not available (such as an ugly 404 message in the middle of the page!). Now that is not an issue - any ugliness comes from my layout, or your formulas
.
Embeddable formulas are officially open for business - any feedback on your experience is welcome.
InstaCalc Feature Tour
October 19th, 2006
InstaCalc makes your life easy. It's a refreshingly different calculator that is simple, fast and surprisingly fun.
Get real-time results.

It's called InstaCalc for a reason: answers appear as you type. Your time is important, the computer's time is not. Spend less time waiting, more time doing.
Normal calculators and spreadsheets make you type and press Enter. Change the numbers, press Enter. Change the numbers again, press Enter.
Why this extra step? Imagine having to press "Enter" every time you typed a key in Word. Decades of spreadsheets and desk calculators have conditioned us to tolerate this pause between entering numbers and getting an answer. Break free.
See what you're working on.

See your work as you go, just like working on paper. You can see how you got an answer and change the numbers in real-time. You don't have to switch between viewing a cell's results and editing the details.
Regular calculators erase your equation to show you the results. You have to keep track of previous results yourself - will you write them down each time? And if you want to change an answer, you need to retype the entire calculation.
Sure, spreadsheets can have multiple equations, but they only show you one cell at a time. For the other cells you see a number like 81.879 and have to guess or remember how it came to be.
Use readable numbers and equations.

Type readable equations! Write what makes it easy for you, not the computer. Type 6.6 billion (or 6.6b), not 6600000000. Write "distance = mph * hours", not "=E3 * C2". Reference your results by name, not cell number.
The spreadsheet replies:
Hey, I can do that too! You want commas? Just Select cell > Format Menu > Cells... > Category Number > Comma Formatting > Click OK. And only lazy people want to write 6.6b instead of 6600000000. Names? Just select the rows, choose Insert > Name > Define...
Meanwhile, you've forgotten what you wanted to do in the first place. InstaCalc gets out of your way.
Link to any result.

You can share a link to any calculation - no logins, no attachments, no fuss. Readers can see your thoughts, change the numbers, and comment back with a new link!
The best part is that your original link stays the same. If someone changes the numbers, they get a new link when they save the page. Compare this to trying to post a spreadsheet or screenshot to your blog - link to a live, editable calculator.
Put a calculator on your website.
![]()
Even better than linking, show your readers your thoughts! Click the Embed button to get code that puts InstaCalc on your site, like this:
Calculations are as shareable as any webpage. Readers can edit the results in real-time, and there's no login required.
Create charts and graphs.

Whip up a quick chart for your article, email or blog (see example). No attachments, no 5-step wizards, just a simple chart. And it's editable - the chart updates as you change the numbers!
Explore dozens of extras.
InstaCalc is filled with powerful options you wouldn't expect from a calculator. The best part? If you never use 'em, they aren't in your face to bother you. See the reference section on the homepage for a full list.
Describe your work.
Add a quick sentence or paragraph about what you were thinking - even include links to background content.

Make programming easier.

Software geeks (myself included) appreciate an easy way to convert numbers to and from hex and binary. Use shortcuts like 1GB (yes, an actual GB). Use binary operations like AND, OR, NOT and XOR. Use simple if-then statements. And keep track of all your results at once.
Use random numbers.

Want to roll dice? Introduce random inputs into your formula? Practice your times tables? It's possible - just add random numbers to your equation.
Hide rows you don't want.

Spreadsheets are nice because they hide details. InstaCalc can do the same: Just click a result to hide details for that row. Show the final results for a calculation, for a clean look.
Take it for a test drive.
InstaCalc was meant to be fast and fun. Nope, you won't be throwing out your spreadsheet; 18-wheelers have their uses. But for everyday use, a sports car is more enjoyable. And a free sports car is even better.
Want quick, easy and shareable results? Use InstaCalc!

Subscribe (RSS)