Extension Icon

Math Functions

Evaluate mathematical expressions with real-time results. Supports common functions like sum, gcd, lcm, trigonometry, and more. Type expressions and press Enter to copy results.
Overview

Math Functions

Evaluate mathematical expressions with real-time results and intelligent auto-completion.

Features

  • Real-time evaluation - See results instantly as you type
  • Smart auto-completion - Automatically completes partial expressions (e.g., sum(5 becomes sum(5))
  • Intelligent operator handling - Handles incomplete operations (e.g., sum(5* becomes sum(5*1))
  • Quick copy - Press Enter to copy results to clipboard
  • Function browser - Browse all available functions when search is empty

Supported Functions

Arithmetic

  • sum(a, b, c, ...) - Add multiple numbers
  • product(a, b, c, ...) - Multiply multiple numbers
  • avg(a, b, c, ...) - Calculate average
  • min(a, b, c, ...) - Find minimum value
  • max(a, b, c, ...) - Find maximum value

Number Theory

  • gcd(a, b, c, ...) - Greatest Common Divisor
  • lcm(a, b, c, ...) - Least Common Multiple
  • factorial(n) - Calculate factorial

Basic Math

  • abs(n) - Absolute value
  • sqrt(n) - Square root
  • pow(base, exp) - Power function
  • round(n, decimals) - Round to decimal places
  • floor(n) - Round down
  • ceil(n) - Round up

Trigonometry

  • sin(x), cos(x), tan(x) - Basic trig functions
  • asin(x), acos(x), atan(x) - Inverse trig functions

Logarithms & Exponentials

  • log(x) / ln(x) - Natural logarithm
  • log10(x) - Base-10 logarithm
  • exp(x) - Exponential (e^x)

Constants

  • pi / PI - π (3.14159...)
  • e / E - Euler's number (2.71828...)

Examples

sum(5+4, 7, 6*3)              → 34
gcd(48, 18)                   → 6
lcm(12, 18, 24)               → 72
sqrt(pow(3, 2) + pow(4, 2))   → 5
sin(pi/2)                     → 1
factorial(5)                  → 120
avg(10, 20, 30)               → 20
round(3.14159, 2)             → 3.14

How to Use

  1. Open Raycast and search for "Math Functions"
  2. Type any mathematical expression
  3. See the result appear instantly
  4. Press Enter to copy the result to clipboard

You can combine multiple functions and use arithmetic operators within arguments for complex calculations.