Home / Servers / Calculators

Calculators MCP server

Exact arithmetic, statistics, units, dates and finance.

A safe expression calculator (no eval), descriptive statistics, unit and number-base conversion, calendar-aware date maths, loan and interest calculators, big-integer and number-theory tools, and linear regression.

Why use the hosted one: Models get arithmetic wrong; these answers are exact, including integers far beyond floating point.

Connect

Run in your terminal
claude mcp add --transport http hj-math https://mcp.hjlabs.in/mcp/math \
  --header "Authorization: Bearer YOUR_API_KEY"

Create an API key and put it in place of YOUR_API_KEY. Step-by-step guides: claude.ai and ChatGPT connectors, Claude Code, Cursor, VS Code, Claude Desktop, Windsurf, Zed, OpenAI Codex CLI, Gemini CLI.

All 28 tools

ToolWhat it does
calculateEvaluate an arithmetic expression exactly: + - * / % ^ (power), ! (factorial), parentheses, constants pi, e, tau, phi, and functions sqrt, cbrt, abs, round(x, places), floor, ceil, sin, cos, tan, asin, acos, atan, ata…
statisticsDescriptive statistics for a list of numbers: count, sum, mean, median, mode, min, max, range, variance and standard deviation (sample and population), quartiles, percentiles you ask for, skewness, and outliers by the…
unit_convertConvert between units of length, mass, area, volume, speed, time, data size (SI and binary: KB vs KiB), pressure, energy, power, angle, frequency and temperature (C, F, K, R). Give a value, a from-unit and a to-unit; …
number_base_convertConvert a whole number of any size between bases 2 to 36 (binary, octal, decimal, hex and more). Accepts 0x, 0b, 0o prefixes and negative numbers.
percentagePercentage questions: "what is X% of Y", "X is what percent of Y", "percent change from X to Y", "Y increased/decreased by X%", and "what number is Y after an X% change".
loan_emiMonthly payment (EMI) for a loan or mortgage from principal, annual interest rate and term, with total interest, total paid and an optional year-by-year amortisation summary.
compound_interestFuture value of a lump sum and/or regular contributions with compound interest, plus total contributions and interest earned. Compounding monthly, quarterly, yearly or daily.
simple_interestSimple (non-compounding) interest: interest amount and total from principal, annual rate and time in years.
date_diffThe time between two dates: years, months and days (calendar-aware), plus total days, weeks, hours, and the weekdays between them.
add_to_dateAdd or subtract days, weeks, months or years to a date (calendar-aware: Jan 31 + 1 month = Feb 28/29). Negative amounts subtract. Returns the date and its weekday.
day_of_weekThe weekday of any date, with its day of year, ISO week number, days left in the year and whether the year is a leap year.
working_daysCount working days (Monday to Friday) between two dates, skipping any holidays you list, or find the date a number of working days after a start date.
ageExact age (years, months, days) on a given date from a date of birth, plus total days lived, the next birthday and the weekday of birth.
big_arithmeticExact arithmetic on whole numbers of any size: add, subtract, multiply, divide (quotient and remainder), power and modular power. Use when numbers exceed 2^53 and floating point would round.
prime_factorsPrime factorisation of a whole number (up to about 10^24 for numbers with small factors), with the factors grouped as powers, the divisor count and the sum of divisors.
is_primeTest whether a whole number is prime (deterministic up to 3×10^24, Miller-Rabin beyond), and give the next and previous primes for numbers under 10^15.
gcd_lcmGreatest common divisor and least common multiple of two or more whole numbers (any size), and whether they are coprime.
fractionSimplify a fraction, convert a decimal to the closest fraction (with a maximum denominator), or convert a fraction to a decimal and a mixed number. Also adds, subtracts, multiplies and divides two fractions exactly.
combinatoricsExact factorial, combinations nCr, permutations nPr, and combinations with repetition, for n up to 5000 (BigInt, no rounding).
quadratic_solverSolve ax² + bx + c = 0: real or complex roots, the discriminant and the vertex. Also handles the linear case a = 0.
triangleSolve a triangle from three sides (SSS), two sides and the included angle (SAS), or two angles and a side (ASA/AAS): all sides, all angles (degrees), area, perimeter, and type.
bmiBody mass index from weight and height (metric or imperial), with the WHO category and the healthy weight range for that height.
tip_splitTip and bill splitting: tip amount, total, and the per-person share for a bill, tip percentage and number of people. Optionally round each share up to the nearest whole unit.
format_numberFormat a number for people: thousands separators in a locale, fixed decimals, currency, percent, compact ("1.2M"), scientific, or as an ordinal (1st, 2nd).
random_numberCryptographically random integers in a range, with or without repeats; or shuffle a list; or roll dice ("3d6"). Use when you need genuine randomness rather than a made-up number.
sequenceGenerate a numeric sequence: arithmetic (start, step, count), geometric (start, ratio, count), Fibonacci, primes, squares, cubes, triangular, or powers of two, with the sum.
linear_regressionFit a straight line y = m·x + b to paired data: slope, intercept, r, r² and predictions for x values you give. Use for trends and simple forecasts.
time_durationConvert between a duration in seconds (or ms, minutes, hours, days) and a human form like "2d 3h 4m 5s", or add up a list of durations ("1h30m", "45m", "2:15:00").

Try asking

What is the EMI on a 25 lakh loan at 8.5% over 20 years, and how many working days until 2026-03-31?

Usage and limits

Every account gets a free daily allowance of tool calls; connecting, listing and searching are not counted. See the limits. Only a tool that runs costs a call.

Other hosted servers