This hkScript plugin replaces the selected text with its evaluated value -- for example, if the selection is "2 + 2" (without the quotes), it is replaced with 4.
The plugin can also be run from the Command Prompt. Entering the command "eval 5 + 10 * 10" (without the quotes) will give an output of 105, for example.
You can bind this plugin to a keyboard shortcut (such as Shift+Ctrl+E) by going to "Tools | Customize | Customize Keyboard Shortcuts."