Skip to content

kingdomseed/cursor-calculator

Repository files navigation

Cursor Cost Calculator

Ask DeepWiki

Try it live →

Empirical tool for measuring Cursor token usage and cost. Manual calculator rates come from Cursor's official docs. If the docs do not disclose a current Cursor rate, the manual calculator does not model it. CSV replay can also use clearly labeled import-only estimates for retired historical labels that no longer exist in the current Cursor catalog.

What it does

  • Budget mode — "I have $60/month, what do I get?" Finds the plan that fits your spend ceiling, then shows plan coverage, token yield, and estimated out-of-pocket spend.
  • Token mode — "I use 10M tokens/month, what does that cost?" Finds the cheapest plan for manual token entry, with both a quick estimate and exact token-bucket entry, and separates estimated usage cost from plan-adjusted out-of-pocket spend.
  • Cursor CSV replay — Import one exported monthly Cursor CSV, reuse the exact input/cache/output token columns, and replay that usage through the same plan recommendation math and cost-versus-coverage framing used by the token calculator.
  • Weighted model mix — Split usage across models (60% Sonnet, 40% Opus). Per-model weights, normalized to 100%.
  • Variant toggles — Max Mode (+20%), Fast, Thinking, Caching. Dedicated Max/1M model variants have long-context rates built in.
  • Caching — Anthropic models use cache_write + cache_read with re-read amortization. Everyone else uses cache_read only. Different systems, different math.
  • Import replay controlsUser API Key rows are included by default for a “Cursor only” estimate, with strict vs best-effort label mapping and approximate rows called out explicitly.
  • Imported Composer handlingcomposer-1 rows are API-priced during replay, while composer-1.5 stays in the included Auto + Composer pool.
  • Monthly usage summary — Imported usage shows priced API tokens, cache-read share within priced API rows, non-cache priced tokens, approximate tokens, unsupported tokens, days used versus comparison days for the imported month or date span, and API tokens per used day.
  • 29 models, 6 providers — Anthropic, OpenAI, Google, xAI, Cursor, Moonshot.

Matching an imported CSV in manual mode

  • Quick estimate — Use API tokens priced from the imported summary as your manual token total, then copy Cache-read share (priced API) into the cache slider.
  • Conservative baseline — Use Non-cache priced tokens as your manual total if you want to see a no-cache starting point.
  • Closest replay match — Switch to Exact token buckets and copy the CSV-style buckets directly: Input with cache write, Input without cache write, Cache reads, and Output.

Running it

npm install
npm run dev

Tests:

npm test

Build:

npm run build

Tech

React 19, TypeScript, Vite, Tailwind CSS 4, Vitest.

Architecture

  • App orchestration boundary: src/app/
    • calculatorState.ts defines reducer-owned source state and defaults
    • calculatorReducer.ts owns state transitions
    • calculatorSelectors.ts derives replay reports, recommendations, and presentation-ready result view models
    • recommendationPresentation.ts is the source of truth for result semantics shown in the UI
    • cursorImportPresentation.ts and cursorImportActions.ts own replay-summary presentation helpers and import-action wiring
    • useCalculatorController.ts coordinates UI wiring and import side-effect orchestration
  • Current Cursor pricing catalog: src/data/cursor-pricing.json
  • Current catalog accessors: src/domain/catalog/
  • Model config defaults, reconciliation, and capability rules: src/domain/modelConfig/
  • Recommendation math and plan comparison: src/domain/recommendation/
  • Import replay catalog and CSV pipeline: src/domain/importReplay/
  • Import-only historical replay models: src/data/importReplayHistoricalModels.ts
  • Import replay label mappings and approximation rules: src/data/importReplayLabelMappings.ts
  • Presentational UI components: src/components/
  • Automated coverage: src/domain/*/__tests__/ and src/app/__tests__/

Not included

  • Auto + Composer pool — Cursor doesn't disclose dollar amounts.
  • Live usage tracking — There is no Cursor API integration here. Imported replay uses exported CSVs, not live account telemetry.
  • First-party verified pricing for every retired import label — Best-effort import mappings are estimates and are labeled as approximate.
  • Thinking token pricing — Not documented separately by Cursor.
  • Teams/Enterprise — Different pricing structures.

License

MIT

About

Estimate Cursor IDE costs across Pro, Pro Plus, and Ultra plans. Compare 28 models, import usage CSVs, and find your best plan.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages