typescript
123456789101112131415
Estimate model tokens for source code, configuration, and structured data across five languages.
| File | Characters | Tokens / 100 chars | ≈ Tokens |
|---|---|---|---|
| 100-line TypeScript file | ≈3,000 | ≈1.0 | ≈1,000 |
| package.json | ≈900 | ≈0.3 | ≈300 |
| 500-line Python module | ≈14,000 | ≈4.7 | ≈4,700 |
| README with code samples | ≈8,000 | ≈2.7 | ≈2,660 |
Punctuation, indentation, short identifiers, and uncommon symbol combinations often create more tokens per character than ordinary prose.