It’s just Markdown.
Until it starts calculating.
Write your document in plain Markdown. CalcMark understands variables, converts units and currencies, then shows results — all while you type.
brew install calcmark/tap/calcmark
Why CalcMark?
Markdown with live calculations
Write natural prose and add calculations inline. Variables flow downward — change one number and everything updates.
# Weekend Trip
We have a budget for two.
budget = $2000 $2,000.00
flights = 2 * $380 $760.00
hotel = 3 * $195 $585.00
left = budget - flights - hotel $655.00Get started →Units are first-class
Physical, data, and energy units with automatic conversion. Write 5 miles in km and get the answer.
5 miles in km 8.05 km
20 celsius in fahrenheit 68 fahrenheit
500 MB in GB 0.49 GBUnits & conversion →Measurement conventions
US gallon or Imperial? Standard ounce or Troy? Declare your convention and CalcMark resolves the ambiguity.
measurement:
volume: imperial
milk = 2 pint in ml 1,137 ml
gold = 10 troy oz 311 gramsMeasurement conventions →Financial modeling
Currency arithmetic, exchange rates, percentages, and growth functions for budgets and P&L statements.
revenue = $4.2M $4.2M
costs = 60% of revenue $2.52M
profit = revenue - costs $1.68M
compound($1000, 7%, 10 years) $1,967.15Business planning guide →Natural language syntax
Read from storage, compress data, calculate network throughput — in plain English.
read 100 MB from ssd 0.18 s
compress 1 GB using gzip 341 MB
transfer 50 GB at 10 gbps 40 sNL syntax reference →Recipe scaling
Fractions, frontmatter scaling, and unit conversion compose naturally for cooking math.
scale: 3
flour = 2/3 cup 2 cup
butter = 1/4 cup 3/4 cup
per_loaf = $7.80 / @scale $2.60Recipe scaling guide →System sizing
Capacity planning with rates, napkin math, and the at...per syntax for fleet sizing.
peak = 10K req/s
servers = peak at 2K per server 5
storage = 100 MB/s over 1 day 8.64 TB
1500000 as napkin ~1.5MSystem sizing guide →Markdown meets math
Prose and calculations in one document. Embed results in text with {{variable}} templates.
## Summary
Total: {{total_cost}}
headcount = 12
rate = $150K
total_cost = headcount * rate $1.8MTemplate interpolation →CLI & agent integration
Pipe expressions, export to JSON/HTML/Markdown, or integrate with AI agents via stdin/stdout.
$ echo "5 kg in lbs" | cm
11 lbs
$ cm eval budget.cm --format json
$ cm convert report.cm --to htmlAgent & API integration →VS Code extension
Syntax highlighting, live preview, and export to HTML, Markdown, or JSON — all inside your editor.
> CalcMark: Open Preview
> CalcMark: Export to HTML
> CalcMark: Export to Markdown
> CalcMark: Export to JSONInstall from Marketplace →