I built Word-Math as a small Windows tray utility that evaluates arithmetic directly inside Microsoft Word. I can type an expression on a line, end it with =, press the configured hotkey, and Word-Math replaces the line with the solved result.
Example:
1250 + 349.99 =
becomes:
1250 + 349.99 = 1,599.99
- Works with the active line in Microsoft Word.
- Supports
+,-,*,x,/, decimals, commas, and parentheses. - Runs from the Windows system tray.
- Lets you change the hotkey from a simple settings window.
- Saves the preferred hotkey in
hotkey.txt.
- Windows
- Microsoft Word
- Python 3.10+
- Packages listed in
requirements.txt
Install dependencies:
python -m pip install -r requirements.txtRun the app:
python WordMath.pyBy default, Word-Math uses:
ctrl+alt+m
- Open Microsoft Word.
- Type a supported math expression on its own line and end it with
=. - Press the configured hotkey.
- Word-Math replaces the line with the expression and result.
Supported examples:
42 + 18 =
1,250 x 4 =
(100 + 25) / 5 =
-12.5 + 40 =
Word-Math only evaluates basic arithmetic. I intentionally block Python code execution and unsupported expression types.
The app communicates with Word through the Windows COM interface, so it must run on a Windows machine with Microsoft Word installed.
Portfolio page: WordMath Macro
This is an early utility project. Future improvements could include packaging it as a Windows executable, adding tests, supporting selected text, and improving the tray settings interface.
