---
title: "Discussion on \"Does Claude prompt caching save money? The break-even math\" | Hashnode"
description: "Discussion on \"Does Claude prompt caching save money? The break-even math\". Originally published at neverpaytwice.com.\nShort answer: usually yes, by a lot, but not always. Writing a prompt to the cache costs more than sending it normally (1.25× the input price for the 5-minut"
url: "https://hashnode.com/posts/does-claude-prompt-caching-save-money-the-break-even-math/6afb35210eb6ca71dd1eae50"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Does Claude prompt caching save money? The break-even math](https://neverpaytwice.hashnode.dev/does-claude-prompt-caching-save-money-the-break-even-math?utm_source=hashnode&utm_medium=feed)

Originally published at neverpaytwice.com. Short answer: usually yes, by a lot, but not always. Writing a prompt to the cache costs more than sending it normally (1.25× the input price for the 5-minut

4d ago · 7 min read · neverpaytwice.hashnode.dev  
Updated 3d ago  
Read the article

-   [#claude](https://hashnode.com/tag/claude)
-   [#llm](https://hashnode.com/tag/llm)

## Written by

[NeverPayTwice](https://hashnode.com/@neverpaytwice)

@neverpaytwice

  
[View profile](https://hashnode.com/@neverpaytwice)

Free, tested guides and MIT scripts on real AI token usage and API costs.

Free, tested guides and MIT-licensed Python scripts on real AI token usage and API costs: Claude Code logs, prompt caching, batch pricing, duplicate charges. Originals at https://neverpaytwice.com

## Responses 2

Markdown supported · ⌘↵ to post

[Ahmet Özel](https://hashnode.com/@ahmetozel)

[4d ago](https://hashnode.com/posts/does-claude-prompt-caching-save-money-the-break-even-math/6afb35210eb6ca71dd1eae50/comment/6afb752391b1c666ea4e31f4)

The 33 usage blocks matching your own engine is a useful consistency check. I would add a few independently hand-calculated fixtures too, especially one request containing both five-minute and one-hour writes, plus a read followed by an ordinary uncached suffix.

The max(0, writes - w1h) line also deserves an input-consistency check. If hourly writes exceed total writes, silently clamping the remainder hides malformed telemetry. Recording that case as unresolved would keep the savings report auditable when log formats or provider usage fields change.

[NeverPayTwice](https://hashnode.com/@neverpaytwice)

[4d ago](https://hashnode.com/posts/does-claude-prompt-caching-save-money-the-break-even-math/6afb35210eb6ca71dd1eae50/comment/6afb752391b1c666ea4e31f4#reply-6afb9acb83359ea66c8f00c1)

Thanks, both fair points, and both are done as of today. The script now leaves a line out of the totals and reports it as inconsistent when the one-hour writes exceed total writes, or when the five-minute and one-hour split doesn't add up to the total, instead of clamping it. There's also a tests file with hand-calculated cases: a request with both write types, a cache read followed by an uncached suffix, and the two malformed breakdowns. The costs function quoted in the post is unchanged; the check runs before it.
