Search...Search plugins and themes...
⌘K
Sign in
  • Get started
  • Download
  • Pricing
  • Enterprise
  • Account
  • Obsidian
  • Overview
  • Sync
  • Publish
  • Canvas
  • Mobile
  • Web Clipper
  • CLI
  • Learn
  • Help
  • Developers
  • Changelog
  • About
  • Roadmap
  • Blog
  • Resources
  • System status
  • License overview
  • Terms of service
  • Privacy policy
  • Security
  • Community
  • Plugins
  • Themes
  • Discord
  • Forum / 中文论坛
  • Merch store
  • Brand guidelines
Follow us
DiscordTwitterBlueskyThreadsMastodonYouTubeGitHub
© 2026 Obsidian

S-Calc

Abdulkader SafiAbdulkader Safi100 downloads

A live calculator code block: write expressions and see each line's result, with units, currencies, percentages, and dates.

Add to Obsidian
S-Calc screenshot
S-Calc screenshot
  • Overview
  • Scorecard
  • Updates3

A calculator you write in a note. Put expressions in an s-calc code block and each line's result appears on the right, in your theme's accent color, updating live as you type.

By Abdulkader Safi.

Usage

Add a fenced block with the s-calc language:

```s-calc
Price: $10
Fee: 4 GBP in Euro
sum in USD - 4%

next friday + 2 weeks
20 ml in tea spoons
20% of what is 30 cm
```

Each line is evaluated in order. The result shows to the right of the line.

Preview

S-Calc demo

What it can do

  • Arithmetic with parentheses: 2 + 3 * 4, (10 + 5) / 3.
  • Labels and variables: Price: 10 or Price = 10, then reuse Price on a later line.
  • sum and prev: sum is the running total of the lines above, prev is the previous line's result.
  • Percentages: 120 - 15%, 20% of 30, 20% of what is 30.
  • Units and conversion: 20 ml in tea spoons, 5 km in miles, 2 kg in lb.
  • Currencies with live rates: 4 GBP in Euro, 100 USD in JPY, 50 KWD in LBP. Every currency the rate feed returns is supported, referenced by ISO code (USD, EUR, GBP, KWD, LBP, …) or common name (dollar, euro, pound).
  • Dates in plain language: next friday, next friday + 2 weeks, today + 90 days.

Blank lines and lines starting with # or // are ignored.

Notes

  • Currency rates are fetched once per session from a free public endpoint (no API key). Currency lines fill in as soon as the rates load.
  • For inches, write inch (the bare word in is used for conversions).
  • Multi-word currency names may not parse; use the ISO code (e.g. LBP).

Develop

Requires Node.js v18 or newer.

npm install      # install dependencies
npm run dev      # rebuild main.js on change
npm run build    # production build
npm run test     # run the engine self-check
npm run lint     # lint with ESLint

For local testing, develop inside your vault at VaultFolder/.obsidian/plugins/s-calc/, then enable the plugin in Settings → Community plugins and reload.

License

Released under the MIT license. See LICENSE.

HealthExcellent
ReviewPassed
About
Compute expressions inline in s-calc code blocks and show each line's result to the right in your theme's accent color, updating live as you type. Use arithmetic, labels and variables, running totals (sum) and prev, percentages, unit and currency conversions with live rates, and plain-language dates.
MathDatesFinance
Details
Current version
0.7.0
Last updated
2 months ago
Created
2 months ago
Updates
3 releases
Downloads
100
Compatible with
Obsidian 1.7.2+
Platforms
Desktop, Mobile
License
MIT
Report bugRequest featureReport plugin
Sponsor
Ko-fi
Author
Abdulkader SafiAbdulkader Safiabdulkader-safi
abdulkadersafi.com
GitHubabdulkader-safi
safi-studio.com
abdulkader.safi
abdulkader-safi
ko-fi.com
  1. Community
  2. Plugins
  3. Math
  4. S-Calc

Related plugins

Tasks

Track tasks across your vault. Supports due dates, recurring tasks, done dates, sub-set of checklist items, and filtering. Maintained by Clare Macrae and Ilyas Landikov, created by Martin Schenck.

Day Planner

Turn tasks from daily notes, the Tasks plugin, and calendars into time blocks on an editable timeline, with built-in time tracker.

Numerals

Turn any code block into an advanced calculator. Evaluate math expressions on each line of a code block, including units, currency, and optional TeX rendering.

Thino

Quickly capture memos and display them in the sidebar with a heatmap. (Closed source)

Update modified date

Automatically update a frontmatter modified date field when the file is modified.

Full Calendar Remastered

Complete Calendar HUB experience. Work with all your calendars in one place. Analyze your time and take action!

LifeOS

Life management system.

Journals

Manage your journals.

Latex Suite

Make typesetting LaTeX math as fast as handwriting through snippets, text expansion, and editor enhancements.

Periodic Notes

Manage your daily, weekly, and monthly notes.