Math Calculator

mathcalc

by Matt

Inline math calculator with full Python math support. Evaluate expressions with +, -, *, /, ^, sqrt, sin, cos, tan, log, factorial and more.

mathcalculatorpythonutility
espanso install mathcalc

Math Calculator for Espanso

Evaluate math expressions inline using Python's math engine.

Requires Python installed on the system.

Triggers

TriggerOutputExample
:calcResult only1013.5
:xcalcExpression = Result(10^3) + sqrt(144) = 1012

Supported operations

  • Basic: +, -, *, /
  • Power: ^ or **
  • sqrt(x), pow(x, y)
  • sin(x), cos(x), tan(x), asin, acos, atan
  • log(x), log2(x), log10(x)
  • ceil(x), floor(x), factorial(x)
  • Constants: pi, e, tau
  • Parentheses and nested expressions

Examples

  • (19+1)^2400
  • sqrt(144)12
  • sin(pi/2)1
  • log10(1000)3
  • factorial(6)720
  • (sqrt(2)+1)^25.828427124

Reference

Full list of available functions: https://docs.python.org/3/library/math.html