Free hook calculator

How many tokens are your Claude Code hooks actually costing you?

Paste your hooks config below and see an estimated token cost per hook, worst first, classified by how often each one fires.

0A hook that only allows or denies
~66A one-time SessionStart context block
~447Raw command output echoed back, per call

Those are the exact measured example figures from Do Claude Code hooks actually cost you tokens? - this project's own guide, sourced from code.claude.com's hooks reference. This calculator applies the same five patterns to your own hooks config instead of a single worked example, and multiplies by how often each event actually fires in a session.

Paste your hooks config0 found
Or add a hook manually
Assumptions

Paste your hooks config or add a hook above to see its estimated token cost per session, worst first.

This models cadence and what you tell it a hook writes back - it can't read your script's logic. Run the free scan for what your real sessions load.

npx usagecutRun a free scan
Recommended next step

A clean setup is just the beginning.

UsageCut trims that for free. Want Claude Code to be genuinely better, not just leaner? ClockedCode is the curated, conflict-free setup - installed in one paste.

Upgrade your Claude Code
  • 10x your Claude Code with hand-picked tools
  • Specialist agents on your team
  • Stop spending hours researching plugins
How this estimate works

Priced by cadence, not just by size

A hook's own stdin input - session_id, tool_input, cwd- never reaches Claude; it's process I/O between Claude Code and your script, detailed in the hooks token cost guide. What costs tokens is what the script writes back, through one of a small set of fields, and this calculator prices exactly that: parse the event and matcher for every hook in your config, classify each event's cadence (once a session, once a turn, or on every matched tool call), then multiply by whichever of the five sourced output patterns you tell it that hook actually uses.

No static tool can read a hook script's own logic - only running it can - so the assumption fields (turns, matched calls, and subagent spawns per session) and the per-hook output-pattern picker are what turn a generic worked example into a number shaped like your own setup. For the schema-size side of a session's standing overhead, see the MCP server token cost checker, or run the free scan below for what your real sessions load.

Free tools

More free tools for Claude Code

Small, focused, no-signup tools from the maker of ClockedCode. Free to use, forever.

UsageCutScan your real Claude Code setup and see exactly where your tokens are wasted, then cut it losslessly.Claude Code Cost CalculatorEstimate your monthly Claude Code cost from sessions per day and workload, and see whether Pro, Max, or API pricing wins.CLAUDE.md Token CounterPaste your CLAUDE.md or AGENTS.md to count its tokens and see which sections look conditional enough to move out.MCP Server Token Cost CheckerPaste your mcpServers config to see the estimated token cost per server, worst first, with tool-search deferred loading on or off.CLAUDE.md GeneratorAnswer a few questions about your stack and get a CLAUDE.md scoped to just that, with a live token cost per section.Context Window CalculatorSee what percent of your context window is used, your headroom before compaction, and the cache-read cost of carrying it.Usage Limit CalculatorProject your Claude Code usage-limit headroom across Pro, Max 5x, and Max 20x from your own baseline and Anthropic's confirmed usage multiplier.Subagent Cost CalculatorSee whether spawning N Claude Code subagents actually saves tokens versus doing the same work in one session, using the measured 216-token subagent overhead.Token Usage AnalyzerPaste lines from a Claude Code session transcript to see the token breakdown by cause: conversation text vs tool output, tool output by Read/Bash/agent calls, and duplicate file reads.Best MCP Servers for Claude CodeBrowse popular Claude Code MCP servers by category and see each one's estimated token cost per session, sorted worst to best.

More free Claude Code tools are on the way - built one at a time by a solo dev who ships daily.

Built for developers using Claude Code every day - by a solo dev who ships daily and uses this on his own setup.

Open-source scanner, runs locally, your code never leaves your machine.

Claude Code tips, every Sunday

One short email a week: the token-saving tricks, setup tweaks, and tools worth your time. Free, unsubscribe anytime.

Hook calculator FAQ

About this estimate

Where do I get my hooks config to paste in?

It's the "hooks" object in settings.json - either ~/.claude/settings.json for hooks that apply everywhere, or a project's .claude/settings.json for project-scoped ones. You can paste the whole file or just the hooks block; both parse the same way.

How does it know what a hook actually writes back?

It doesn't - no client-side tool can read what your hook script does at runtime. You tell it per hook, picking from the same five patterns this project's own hooks-token-cost guide measured: silent (0 tok), a short note (~38 tok), a one-time context block (~66 tok), filtered output (~28 tok), or raw output echoed back (~447 tok). Changing that selection is what makes the estimate yours instead of a generic guess.

Why do the assumption numbers (turns, calls, subagents per session) matter so much?

Cadence compounds faster than per-call size does. A 38-token PreToolUse deny reason at the default 30 matched calls already adds up to 1,140 tokens - over 17x a one-time SessionStart block at the same per-write cost. Set the three assumption fields to match your own real session shape for a number that's actually yours.

Does a hook's own stdin input cost anything?

No. Claude Code hands your script the same tool_input Claude just generated to make the call - it's process I/O between Claude Code and the script, never re-sent to the model. Only what the script's own output writes into a handful of specific fields ever reaches Claude, which is exactly what this calculator prices.

FAQ

Questions, answered

Is UsageCut really free?

Yes. The scan and every fix are free - no card, no subscription, no signup. You only give an email if you want the optimization plan and one-command undo sent to your inbox.

Is my code safe? Does UsageCut upload anything?

The scan runs entirely on your machine. It never uploads your code, never reads your API key, and never sends your prompts or conversations anywhere. Only anonymous summary counts leave, and only if you choose to share them.

How does it reduce Claude Code token usage?

It reads your local setup and session history to find waste - idle MCP servers loaded into every session, an oversized CLAUDE.md re-sent on every request, duplicate file reads, and bloated tool output - then trims it losslessly, so each session carries less context and you hit your limit far less often.

What is ClockedCode?

ClockedCode is the curated, conflict-free Claude Code setup from the same maker. UsageCut makes your current setup leaner; ClockedCode makes it genuinely better - a set of hand-picked tools, specialist agents, and a tuned CLAUDE.md, installed in one paste.

Who is ClockedCode for?

Developers who use Claude Code daily and want a setup that is powerful out of the box instead of spending hours researching and wiring up plugins, agents, and MCP servers themselves.

What's included in ClockedCode?

A vetted, conflict-free bundle of hand-picked tools, specialist agents, and a tuned CLAUDE.md - everything installed together in one paste, with no setup archaeology.

Is ClockedCode a one-time payment?

Yes. ClockedCode is a one-time purchase with an instant download - no subscription and no recurring fees.

Does ClockedCode work with my existing setup?

Yes. It installs alongside what you already have and is fully reversible. Run UsageCut first to clean your current setup, then add ClockedCode to level it up.