There is some controversy over my downvoting in this question. I will explain my reasoning by quoting Jef Raskin, the late usability expert, and originator of the macintosh project at apple.
Calculator or Computer?
It's true, Many of us keep a calculator beside our computers. Why do you need this simple-minded device when you have a whole computer in front of you? You need it because you have to go through contortions worthy of a circus sideshow in order to do simple arthmetic with the computer. There you are, tapping away at your word processsor, when you want to do a division: 375 packages of Phumoxx cost $248.93; what is the price for one package? On my computer, I have to open up a calculator window. To do this, I move my hand from the keyboard to the mouse, which I use to do a click-and-drag to open the calculator. Transferring my hands back to the keyboard, I type in the numbers I need or tediously cut and paste them from my document. Then I have to press a few more keys and finally copy the results from the calculator window into my document. Sometimes, the calculator window opens right on top of the very numbers I need, just to add insult to injury. In that case, I must use the mouse to move the calculator window out of the way before proceeding. It is much faster to grab the pocket calculator.
do not think just because you are a programmer you are immune to usability issues. Using a software calculator can be a significant drain on your time, and when you're a professional software developer, time is some serious money, yo.
Jef Raskin went on to propose a solution for a better software calculator. I did not downvote those that I thought were similar enough to Raskin's solution, such as using spotlight. If you're using Textmate, textmate has a feature which is almost EXACTLY the solution that Raskin proposed, that is, you highlight a text which represents a mathematical operation, and you press the "calculate" key on the keyboard. Since most keyboards sadly lack a "calculate" key, in textmate you use control+shift+c instead. All text editors should have this feature. it is sad if they don't.
Also, his son aza made a program called enso. If you have enso installed, you can highlight a calculation, (anywhere in windows), hold down the capslock key and type "calc", and it will perform the calculation, replacing the selected text with the result.
the quote continues
Using an experienced computer and calculator operator as my test subject, with his word processing program open before him, I measured the total time it took for him to pick up a calculator, turn it on, do a simple addition, and return his hands to the keyboard to resume typing. It took about 7 seconds. I then measured the time it took for him to use the built-in calculator. He had to move the cursor to the menu bar at the top of the screen, find the calculator program, open the calculator, enter the sum, and then click back in the word processor so that he could resume typing. This took about 16 seconds.