Numerals

by RyanC
5
4
3
2
1
Score: 75/100

Description

Category: Coding & Technical Tools

The Numerals plugin is a powerful tool that enables users to perform mathematical calculations and insert the results into their Obsidian notes. With this plugin, you can write complex math expressions in Markdown code blocks and evaluate them instantly. The plugin also offers advanced features such as result annotation, autocompletion of functions and variables, and style settings for customization. Additionally, Numerals supports mapping currency symbols to different currencies and allows users to specify the format of rendered results. Overall, this plugin is an excellent choice for anyone who needs to perform complex calculations or visualize data in their Obsidian notes.

Reviews

No reviews yet.

Stats

645
stars
72,976
downloads
21
forks
1,396
days
20
days
138
days
73
total PRs
0
open PRs
13
closed PRs
60
merged PRs
124
total issues
33
open issues
91
closed issues
111
commits

Latest Version

5 months ago

Changelog

🎉 Numerals 1.10.2 🎉

The first new Numerals release in a year, with major new features as well as behind-the-scenes clean-up!

Big additions are inline calculations, cross-note references, better note-wide variables, inline suggestions, click-to-edit rendered blocks, and a refreshed README for users discovering Numerals through Obsidian.

Highlights

  • 🧮 Inline calculations - Use Numerals directly in normal sentences with inline code:

    • `#: 3ft * 4ft` -> 12 ft^2
    • `#=: 2 * (3ft + 4ft)` -> 2 * (3 ft + 4 ft) = 14 ft
  • 🔗 Cross-note references - Reference frontmatter and Dataview metadata from other notes:

    • [[Client Settings]].hourlyRate * 8hr
    • [[config]].rates.hourly * [[invoice]].hours
  • 🧾 Better note-wide variables - $ variables now work across math blocks and inline expressions:

    • Define $rate = $150/hr once
    • Use it later with `#: $rate * 40hr`
  • ⏮️ Inline @prev support - Chain inline calculations together:

    • `#: 100 * 1.2`
    • `#: @prev * 1.08`
  • ✨ Inline auto-complete - Suggestions now work inside inline Numerals expressions, including variables, functions, constants, cross-note properties, and Greek letters.

  • 🖱️ Click rendered blocks to edit - In Live Preview, click or tap rendered Numerals math blocks to jump back to the matching source line.

  • 🛠️ Large reliability pass - This release includes major internal cleanup, stricter TypeScript, Obsidian community review fixes, better lifecycle cleanup, and a modernized release workflow.

Inline Numerals

You can now calculate directly in prose:

The total cost is `#: $150/hr * 8hr`.

Or show the equation and result:

The room perimeter is `#=: 2 * (12ft + 10ft)`.

Inline calculations work in Live Preview and Reading mode, and support the same units, currencies, functions, frontmatter values, Dataview values, and formatting behavior as math blocks.

Cross-note references

Use another note metadata inside calculations:

```math
hours = 12 hr
subtotal = [[Client Settings]].rates.hourly * hours
tax = subtotal * [[Client Settings]].taxRate
total = subtotal + tax =>
```

Nested properties are supported with dot notation:

[[config]].rates.hourly

Cross-note references work in math blocks and inline calculations, and rerender when referenced metadata changes.

Complete change list

Added:

  • Inline calculation support with `#:` result mode and `#=:` equation mode.
  • Inline calculations in Live Preview and Reading mode.
  • Inline auto-complete suggestions.
  • Inline @prev.
  • Note-global $ variables shared between math blocks and inline expressions.
  • Cross-note references using [[note]].property.
  • Nested cross-note property access.
  • Setting to enable or disable cross-note references.
  • Settings tab icon for newer Obsidian versions.

Changed:

  • Refreshed the README around the stable feature set, with glanceable examples for Obsidian users.
  • Upgraded mathjs to 15.2.0.
  • Changed license to MIT.
  • Refactored the rendering and evaluation pipeline.
  • Enabled TypeScript strict mode.
  • Migrated to ESLint flat config with Obsidian plugin rules.
  • Stopped bundling Dataview and now use the runtime Dataview API when available.
  • Modernized beta and production release workflows.
  • Moved the legacy source colocated Numerals test into the Jest-covered tests/ directory.

Fixed:

  • Dataview phantom metadata keys causing undefined symbol errors.
  • Currency setting changes requiring restart.
  • Inline widgets briefly appearing in Source mode.
  • Tiny non-zero values rendering as 0 or -0.
  • Large numbers in syntax-highlighted input rendering in scientific notation.
  • Result insertion targeting the wrong editor in split panes.
  • Event listener leaks and double rendering.
  • Hidden frontmatter evaluation errors.
  • Re-enable/reload issues around custom math units.
  • Obsidian Community Plugin review warnings.

Removed:

  • One-off agent planning and architecture documents, unused config stubs, and unreferenced PR screenshots from the repository.
  • Legacy beta manifest flow in favor of modern BRAT release assets.

🙏 Acknowledgements

Hat tip to @andersfischernielsen for the suggestion and initial implementation of click-through on math blocks!

README file from

Github

Numerals

Obsidian Downloads GitHub release

Numerals turns Obsidian notes into living calculations. Use math blocks or inline expressions to calculate with units, currencies, variables, functions, frontmatter, Dataview metadata, and values from other notes.

Channel Availability
Stable 1.10.2 Available through Obsidian's Community Plugins browser. The guide below describes this published release.
Recovery preview 1.11.0 Under development for Obsidian 1.13+. Not yet published, including through BRAT. See the preview features.

Numerals Lemonade Stand - Side by Side

At a Glance

Examples use the default $ → USD mapping and US English number formatting. Separators follow your selected number format.

Feature Example
Inline calculations `#: 3ft * 4ft` -> 12 ft^2
Show-your-work equations `#=: 2 * (3ft + 4ft)` -> 2 * (3 ft + 4 ft) = 14 ft
Full math blocks math<br>20 mi / 4 hr to m/s<br> -> 2.235 m / s
Units and conversions 100 km/hr in mi/hr -> 62.137 mi / hr
Currency math $100/hr * 3 days -> 7,200 USD
Note-wide variables $rate = $150/hr, then `#: $rate * 40hr`
Cross-note references [[Client Settings]].rates.hourly * 8hr
Result insertion @[profit] = $2,400 - $850 becomes @[profit::1,550 USD] = $2,400 - $850

Quick Start

Add a math code block anywhere in a note:

```math
revenue = $2,400
expenses = $850
profit = revenue - expenses =>
```

Or calculate directly in a sentence:

The project total is `#: $150/hr * 8hr`.

Use equation mode when the calculation itself is important:

The room perimeter is `#=: 2 * (12ft + 10ft)`.

Stable Features

Inline Calculations

Inline Numerals expressions are ordinary inline code with a trigger prefix:

Syntax Renders as Best for
`#: 3ft * 4ft` 12 ft^2 Showing just the answer
`#=: 3ft * 4ft` 3 ft * 4 ft = 12 ft^2 Showing the expression and answer

Inline calculations work in Live Preview and Reading mode. They support the same math engine, number formatting, units, currency symbols, variables, frontmatter, and Dataview values as math blocks.

Both trigger prefixes and the equation separator are configurable in Numerals settings. Inline TeX triggers belong to the unpublished recovery preview; stable supports TeX rendering in math blocks.

Math Blocks

Numerals math blocks are ideal for longer calculations:

```math
# Lemonade stand
cups = 120
price = $1.50
revenue = cups * price
lemons = $18
sugar = $7
profit = revenue - lemons - sugar =>
```

Use => to highlight important results. Lines without a highlighted result can be dimmed or hidden depending on your settings.

Units, Currency, and Functions

Numerals uses mathjs for calculations and adds Obsidian-friendly preprocessing for currency symbols and readable number input.

Type Examples
Units 1ft + 12in -> 2 ft
Conversions 72 degF to degC -> 22.222 degC
Currency $1,000 * 2 -> 2,000 USD
Rates $100/hr * 3 days -> 7,200 USD
Functions sqrt(144), sin(pi/2), log(1000, 10)
Bases 0xff + 0b100 -> 259
Fractions fraction(1/3) + fraction(1/4) -> 7/12

Currency symbols can be customized in settings. Numerals treats currencies as units: it does not fetch exchange rates or automatically convert between currencies.

Note-Wide Variables

Prefix a variable or function with $ to make it available across the whole note:

```math
$rate = $150/hr
$discount(x) = x * 0.9
```

Estimate: `#: $rate * 40hr`
Discounted: `#: $discount($rate * 40hr)`

Note-wide variables work across math blocks and inline expressions.

Previous Results

Use @prev to refer to the previous result:

```math
base = 100
base * 1.2
@prev * 1.08
```

Inline expressions can use @prev too:

First year: `#: 100 * 1.2`
Second year: `#: @prev * 1.08`

Totals

Use @total or @sum to add previous results up to the last blank line or heading/comment:

```math
$12
$18
$25
@total =>
```

Frontmatter and Dataview Metadata

Frontmatter is opt-in by default. Select the note properties Numerals should read with the numerals property:

---
numerals: [price, quantity]
price: 29.99
quantity: 150
---

`#=: price * quantity`

Use numerals: all to expose all frontmatter properties to Numerals. $-prefixed frontmatter values are automatically available as note-wide variables.

Dataview inline fields and metadata can also be used in calculations when Dataview is installed. Expose the desired fields with the same numerals property selection, or enable Always process all frontmatter in settings.

Cross-Note References

Reference frontmatter and Dataview metadata from other notes with [[note]].property. In the referenced note, expose the needed properties with numerals too; for this example, numerals: [rates, taxRate]:

```math
hours = 12 hr
subtotal = [[Client Settings]].rates.hourly * hours
tax = subtotal * [[Client Settings]].taxRate
total = subtotal + tax =>
```

Nested properties use dot notation:

[[config]].rates.hourly
[[project/invoice]].lineItems.total

Cross-note references work in math blocks and inline expressions. When referenced metadata changes, Numerals rerenders dependent inline values.

Result Insertion

Use @[label] to write a result back into the raw note as Dataview-style inline metadata:

```math
@[profit] = $2,400 - $850
```

With US English number formatting, Numerals updates the value inside the label and keeps the assignment and expression:

```math
@[profit::1,550 USD] = $2,400 - $850
```

Auto-Complete

Auto-complete suggestions work in math blocks and inline Numerals expressions. Suggestions can include:

  • Variables from the current block
  • Note-wide $ variables
  • Frontmatter and Dataview metadata
  • Cross-note properties after [[note]].
  • mathjs functions and constants
  • Greek letters by typing :, such as :mu -> μ

Click to Edit in Live Preview

Rendered math blocks remain easy to edit. Click or tap a rendered Numerals line in Live Preview to focus the matching source line.

Stable Display Options

Numerals is designed to fit naturally with Obsidian themes and supports multiple render styles.

Render Style

Choose a default render style in settings, or set it per block:

Block language Style
math Uses your configured default
math-plain Plain text
math-tex TeX-style rendering
math-highlight Syntax-highlighted input

Numerals Render Style Side by Side

Layouts

Choose how results appear next to calculations:

  • Two panes: input and result in separate columns.
  • Answer to the right: compact inline result display.
  • Answer below: result appears on the next line.

Numerals 2 Panes Numerals answer right Numerals answer below

Number Formatting

Configure how rendered numbers are displayed:

  • System formatted: follows your local system separators.
  • Fixed: full precision with no thousands separator.
  • Exponential: scientific notation.
  • Engineering: exponent is a multiple of 3.
  • Formatted: choose a specific thousands/decimal style.

Rounding Values

To round a calculated value in stable 1.10.2, use mathjs round. For units and currencies, supply the unit as the third argument:

Expression Result
round(123.456, 2) 123.46
round(3.241 cm, 1, cm) 3.2 cm
round(12.345 GBP, 2, GBP) 12.35 GBP

Rounding changes the value used by later calculations. Number formatting changes how a value is displayed.

Currency Display in Stable

Stable 1.10.2 uses the general Rendered number format setting for currency results. It has no separate currency-precision or symbol-display control. For example, $1,000 * 2 renders as 2,000 USD with US English number formatting; stable does not automatically add two currency decimal places.

The $ symbol currency mapping, ¥ symbol currency mapping, and Custom currency mapping settings select the units used for currency input. They do not fetch exchange rates.

Installation

Install Numerals from Obsidian's Community Plugins browser for stable 1.10.2.

The 1.11.0 recovery candidate is not yet published. A future prerelease will be available for testing through BRAT, with installation details in its release notes. Installing BRAT today does not make these preview features available.

Recovery Preview — Not Yet Published

The following features are being prepared for 1.11.0, targeting Obsidian 1.13+. They are absent from Community Plugins stable 1.10.2. If you cannot find these settings in stable, you have not missed a setup step.

Preview setting Purpose
Currency precision Use standard currency decimal places, or follow the general number format.
Currency display Show a configured currency symbol or a currency code.
Custom currency decimal places Choose precision for a custom currency mapping.
TeX result trigger #$: renders an inline result with MathJax.
TeX equation trigger #$=: renders an inline expression and result with MathJax.

The recovery candidate defaults to configured symbols, including for upgrades without a saved display choice. A valid saved code/symbol preference is preserved. Currency-standard precision uses the currency's conventional decimal places; compound rates such as GBP / hour keep the general number format and code. Result insertion always writes currency codes, even when the displayed result uses a symbol.

The preview also adds block-level formatting directives:

```math
@format comma-period
@decimalPlaces 2
subtotal = 1234.5
third = 1 / 3
```

@format selects the displayed number format: system, fixed, exponential (or scientific), engineering, comma-period, period-comma, space-comma, or indian. @decimalPlaces sets 0–20 decimal places and takes precedence over currency-standard precision; @decimalPlace is an alias. These directives affect displayed and inserted results while retaining the calculated values in scope. They are not supported in stable 1.10.2.

Reliable top-to-bottom evaluation of note-wide variables is also planned for recovery. That work is still in progress and is not a shipped guarantee.

Development

Numerals is an Obsidian community plugin written in TypeScript and bundled with esbuild.

Use Node 24 (see .nvmrc) and the committed npm lockfile for maintenance builds. Pull requests to master run the same checks for code and documentation changes while preserving the default-branch package, lockfile, plugin source and styles baseline. That baseline includes unreleased merged features; the distribution manifest and compatibility mappings continue to identify stable 1.10.2.

Local Commands

npm ci
npm run dev
npm test
npm run lint
./node_modules/.bin/tsc --project tsconfig.json
./node_modules/.bin/tsc --project tsconfig.test.json
./node_modules/.bin/tsc --project tsconfig.scripts.json
node --test tests/maintenance/*.test.mjs
npm run build
node scripts/check-reproducible-build.mjs
node scripts/check-stable-maintenance.mjs

Versioning

Maintenance preserves package.json and package-lock.json byte-for-byte from the default-branch baseline, and preserves manifest.json and versions.json as the stable 1.10.2 distribution metadata. Do not run version-bump commands here. Candidate version changes belong on chore/recovery-1.11 and must follow that branch's reviewed procedure.

Mathjs Symbol Suggestions

Auto-complete suggestions for mathjs functions and constants are kept as a static list in src/mathjsUtilities.ts.

When upgrading mathjs, run:

npm run symbols:check

If the check finds intentional changes, run:

npm run symbols:update

Review the generated diff and adjust explicit exclusions in scripts/mathjs-symbols.ts for documented symbols that should not appear in suggestions.

Releases

Publication from this stable maintenance branch is disabled. The tag workflow and npm run release, npm run release:beta and npm run release:production fail without publishing or updating metadata.

Only the owner may prepare BRAT prereleases from the reviewed chore/recovery-1.11 branch, using its own validation and publication workflow. Stable remains 1.10.2; production promotion, moving existing tags and replacing published assets are prohibited. Keep this branch's publication-denial files separate from the recovery publisher.

The publication denial applies to commits containing these entrypoints. Historical tags retain their historical workflows; the owner-only reviewed recovery tagging policy still applies.

Installed candidate acceptance

GitHub requires a manually dispatched workflow to exist on the default branch before it can be selected on another branch. The default .github/workflows/installed-acceptance.yml only registers Installed candidate acceptance, with required string inputs selection (owner-reviewed bounded artifact-selection JSON) and plan (reviewed allowlisted .plan.json filename). This stub always fails with fixed guidance, including when copied to another branch; it never reads the inputs, checks out code, downloads artifacts or runs an app. Only the owner may dispatch the separately reviewed chore/recovery-1.11 version, which must independently validate the selected ref, artifact and plan. See GitHub's manual workflow documentation. Registration does not perform acceptance or authorize publication.

Other Obsidian calculation plugins may fit different workflows:

  • obsidian-calc for calculator-style expression evaluation and result insertion.
  • obsidian-mathpad for a fuller computer algebra system inside Obsidian.

Numerals is also inspired by calculator-as-notes apps such as Numi, Numbr, and Soulver.

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
Desmos
5 years ago by Nigecat
Embed graphs directly into your obsidian notes
Latex Suite
4 years ago by artisticat1
Make typesetting LaTeX as fast as handwriting through snippets, text expansion, and editor enhancements
Obsidian Columns
4 years ago by Trevor Nichols
Advanced Codeblock
4 years ago by Lijyze
An obsidian plugin that give additional features to code blocks.
Mathpad
4 years ago by Gabriele Cannata
Computer Algebra System (CAS) for Obsidian.md
Obsidian asciimath
4 years ago by widcardw
Asciimath support for Obsidian (based on asciimath-parser)
ProgressBar
4 years ago by Wei Zhang
Code block plugin for Obsidian generating a progress bar
Codeblock Customizer
3 years ago by mugiwara
Codeblock Customizer plugin for Obsidian
HK Code Block
3 years ago by Heekang Park
Obsidian plugin developed by Heekang Park; Make code block looking good on reading view
Latex Matrices
3 years ago by Daniele Susino
An obsidian plugin to create latex matrices.
MathLive
3 years ago by Dan Zilberman
The must-have plugin for math in Obsidian
Typst Renderer
3 years ago by fenjalien
Renders typst code blocks in Obsidian into images using Typst through the power of WASM!
Code Styler
3 years ago by Mayuran Visakan
A plugin for Obsidian.md for styling codeblocks and inline code
CodeBlock Tabs
3 years ago by Jemin Mau
Create tab group for contiguous codeblocks.
MLIR Syntax Highlight
3 years ago by Lewuathe
Codeblock Template
3 years ago by Super10
A template plugin that allows for the reuse of content within Code Blocks!一个可以把Code Block的内容重复利用模板插件!
No more flickering inline math
3 years ago by Ryota Ushio
No longer disturbed by flickering inline math in Obsidian.
Calctex
3 years ago by Mike
An Obsidian plugin for automatic calculation of LaTeX formulas.
Todo.txt Codeblocks
3 years ago by Benjamin Nguyen
Manage your tasks inside Obsidian codeblocks according to the Todo.txt specification.
CSV Codeblock
3 years ago by elrindir
Plugin for obsidian to render csv syntax in codeblocks.
Minitabs
3 years ago by ssjy1919
Obsidian tabs
Mathematica Plot
3 years ago by Marcos Nicolau
Insert functions on Obsidian using Wolfram Mathematica!
MathLive in Editor Mode
2 years ago by MizarZh
MathLive input in editor mode.
Math Indicator Changer
2 years ago by Ori Replication
Latex Environments
6 years ago by Zach Raines
Quickly insert and change latex environments within math blocks in Obsidian.
ABC Music Notation
6 years ago by Til Blechschmidt
Plugin which renders music notations from code blocks
Embedded Code Title
5 years ago by tadashi-aikawa
It is an Obsidian plugin which can embeds title to code blocks.
Quick LaTeX
5 years ago by joeyuping
Meld Calc
5 years ago by meld-cp
IMSwitch in Math Block
2 years ago by XXM
MathType
2 years ago by slateblua
Math typing plugin for Obsidian
Collapsible Code Blocks
2 years ago by Bradley Wyatt
Obsidian Plugin that makes code blocks collapsible in reading and edit view as well as enabling scroll-able code blocks.
Command Line
2 years ago by Steven Stallion
Copy command lines from your notes to the clipboard.
Project Euler Stats
2 years ago by Artem Korsakov
Get statistics from Project Euler.
YAML Table
a year ago by dainakai
Replace Pencil
a year ago by penyt
🐧 An Obsidian plugin that can easily replace the custom variable in the code block.
Calculite
a year ago by Holo
Standard calculator plugin for Obsidian.
Code Blocks commands
a year ago by dragonish
Provide commands to insert code blocks with markup, and support triggering commands with backticks.
Quick Matrix
10 months ago by Charlie Flowe
Plugin for Obsidian.md that allows for faster interactions with matrices in LaTeX
LaTeX Panel Helper
10 months ago by Luster
A powerful and convenient LaTeX symbol panel for Obsidian to enhance your mathematical and scientific note-taking efficiency.
Typst Mate
8 months ago by azyarashi
Render math expressions with Typst instead of MathJax in Obsidian.
Segerlab
6 months ago by Semyon Kononchuk
Renders calculator views within Obsidian notes from JSON data copied from the Segerlab app.
Math+
4 months ago by ocapraro
This is an Obsidian plugin for taking math notes using Excalidraw.
Excalidraw Math Plotter
2 months ago by ahmeddawoud3
Plot mathematical function graphs directly onto Excalidraw canvases.