Calculates math expressions with high precision to prevent floating-point errors.

Install

mkdir -p .claude/skills/calculator && curl -L -o skill.zip "https://agentskills.codes/api/skills/download/2901" && unzip -o skill.zip -d .claude/skills/calculator && rm skill.zip

Installs to .claude/skills/calculator

Activation

This is the description your AI agent reads to decide when to run this skill — the better it matches your request, the more reliably it fires.

Performs arbitrary-precision arithmetic calculations including addition, subtraction, multiplication, division, and exponents. Use when the user asks to calculate, compute, or evaluate math expressions, or when precise decimal arithmetic is needed to avoid floating-point errors.
279 chars✓ has a “when” triggerlonger than Claude Code's old 250-char listing cap (fine on current versions)
Beginner

Key capabilities

  • Perform arbitrary-precision arithmetic
  • Evaluate complex math expressions
  • Handle operator precedence and parentheses
  • Calculate exponents with integer powers

How it works

The skill uses the big.js library to parse and evaluate arithmetic expressions, ensuring high-precision decimal math by avoiding standard floating-point limitations.

Inputs & outputs

You give it
Arithmetic expression string
You get back
Precise decimal result

When to use calculator

  • Calculating financial values requiring precision
  • Evaluating complex arithmetic expressions
  • Solving math problems without floating-point errors

About this skill

Calculator

Evaluate arithmetic expressions with arbitrary-precision decimal math using big.js.

When to Use

  • User asks to calculate or evaluate a math expression
  • Precise decimal arithmetic is needed (avoids floating-point errors like 0.1 + 0.2 = 0.30000000000000004)
  • Expressions involve parentheses, operator precedence, or exponents

Supported Operations

OperatorDescriptionPrecedence
+Addition1
-Subtraction1
*Multiplication2
/Division2
^Exponent (right-associative)3
()ParenthesesHighest

Usage

cd scripts
npm ci || npm install
npm run build
npm run calculate "<expression>"

Examples

InputOutput
"3 + 2"5
"10 / 4"2.5
"2 ^ 10"1024
"(2 + 3) * 4"20
"1 + 4.5 * (3-6) / 5"-1.7
"-5 + 3"-2
"2 ^ 3 ^ 2"512 (right-associative: 2^9)

Edge Cases

  • Empty expression: Throws "Empty expression" error
  • Mismatched parentheses: Throws "Mismatched parentheses" error
  • Division by zero: big.js throws an error
  • Exponent must be integer: big.js .pow() requires integer exponents

Limitations

  • No trigonometric functions (sin, cos, tan)
  • No variables or symbolic math
  • Exponents must be integers
  • No factorial, modulo, or bitwise operators

When not to use it

  • Trigonometric or symbolic math
  • Operations requiring modulo or bitwise logic

Prerequisites

Node.jsnpm

Limitations

  • No trigonometric functions
  • Exponents must be integers

How it compares

It guarantees precise decimal results for financial or complex calculations, unlike standard floating-point arithmetic which can introduce rounding errors.

Compared to similar skills

calculator side by side with the closest alternatives in the catalog.

SkillInstallsUpdatedSafetyDifficulty
calculator (this skill)77moReviewBeginner
maintainx-data-handling127dReviewIntermediate
apify-ultimate-scraper03moReviewIntermediate
bgmx01moReviewIntermediate

Try saying

Example prompts that trigger this skill in your AI assistant.

You might also like

maintainx-data-handling

jeremylongshore

Data synchronization, ETL patterns, and data management for MaintainX. Use when syncing data between MaintainX and other systems, building ETL pipelines, or managing data consistency. Trigger with phrases like "maintainx data sync", "maintainx etl", "maintainx export", "maintainx data migration", "maintainx data pipeline".

12

apify-ultimate-scraper

Anhvu1107

ALWAYS use this when the request matches Apify Ultimate Scraper: AI-driven data extraction from 55+ Actors across all major platforms.

00

bgmx

yjl9903

Maintain bgmx project data workflows only when the user explicitly invokes $bgmx or explicitly asks Codex to maintain bgmx data. Covers syncing Bangumi subject data, manually creating Bangumi subject revisions, syncing yuc.wiki seasonal calendars, and switching the active online calendar season.

00

word

Fergana-Labs

Create, read, edit, and manipulate Microsoft Word documents (.docx files). Use when users ask to work with Word files, create documents, read .docx files, or format text documents.

26172

gmail-manager

jeffvincent

Manage Gmail - send, read, search emails, manage labels and drafts. Use when user wants to interact with their Gmail account for email operations.

27154

clawhub

openclaw

Use the ClawHub CLI to search, install, update, and publish agent skills from clawhub.com. Use when you need to fetch new skills on the fly, sync installed skills to latest or a specific version, or publish new/updated skill folders with the npm-installed clawhub CLI.

25151

Search skills

Search the agent skills registry