Context Window Planner
How much code fits in one prompt?
Pick a model, describe your project, and see the math. No sign-up. Runs in your browser.
Pick a model
Pick from the list, or scroll down to enter a custom context size.
Describe your codebaseUse 'Estimate from files × lines' if you don't know the exact line count. Use 'Exact total lines' if you've already run cloc or wc -l.
LanguageDifferent languages tokenize differently. Python averages ~8 tokens/line, Java ~11. These are empirical averages across Llama, Qwen, and Mistral tokenizers.
- Your codebase
- 96.0K tokens
- Context window
- 32.8K tokens
- Available for code
- 23.8K tokens
- Files at a time
- ~29
120 files × 80 lines × 10 tok/line = 96.0K tokens
Semantic search
Use search to find relevant code snippets. Don't try to stuff everything in. Let the tool pull what it needs.
Same codebase, different models
How coverage changes across context window sizes with your 96.0K-token codebase.
| Model | Context | Coverage | Strategy |
|---|---|---|---|
| Phi-4-mini | 16K | 12% | Semantic search |
| Qwen2.5-Coder-32B | 32K | 24.8% | Semantic search |
| Qwen3-14B | 128K | 100% | Whole-repo context |
| Llama 3.3 70B | 128K | 100% | Whole-repo context |
How the math works
Lines of code multiplied by a tokens-per-line ratio for your language. Python averages ~8 tokens/line, Java ~11. These are empirical averages across Llama, Qwen, and Mistral tokenizers.
Not all context goes to code. 15% is reserved for conversation history, 10% for the model's response, and ~800 tokens for the system prompt. The rest is what you can fill with source code.
Over 80% coverage? Paste the whole repo. Between 30-80%? Point at specific files. Under 30%? Use search or a retrieval-augmented workflow. The tool tells you which.
Let Bodega One manage the context for you.
Bodega One reads your project, builds a semantic index, and pulls in the right files automatically. No manual context stuffing. Runs on your machine. One-time purchase.
Join the WaitlistToken estimates are approximate. Actual tokenization varies by model and content. Estimates use average tokens-per-line ratios by language. Last updated March 2026.