// tech-debt-calculate
Paste any code snippet and receive a full technical debt assessment. Detects duplicated blocks, dead code, overly long functions, high cyclomatic complexity, and missing error handling — then producesdollar-value remediation estimatesand a prioritized refactor queue sorted by cost-to-fix vs risk.
Paste your code above to calculate technical debt
Supports Python, JavaScript, and TypeScript// how-it-works
Pattern Analysis
Your code is parsed line-by-line to extract functions, decision points, and structural patterns. No AST is built — we use heuristics tuned for Python, JavaScript, and TypeScript to detect the five debt categories.
Metric Computation
Each category is scored independently: duplicate blocks are found via line-sequence matching, dead code via reachability analysis, function length by body line count, complexity by decision point counting, and error handling by try/catch coverage of risk operations.
Cost Estimation
Dollar estimates use industry repair-time averages (a simple duplicate takes ~2h at $150/h, a complex refactor ~8h at $200/h). These are estimates — your team's velocity and rates will differ.
Priority Ranking
Items are sorted by a composite score: (estimated_cost × risk_weight) / estimated_effort. High-cost, high-risk items float to the top, giving you a clear, actionable refactor queue.
// verdict
## // verdict
Should I adopt this? Yes — as a shared vocabulary for a debt conversation. No — as a budget.
What it actually is. A client-side estimator that walks a codebase throughstatic heuristics — pushing debt ratios from line counts, comment density, structural signals. It runs entirely in your browser; nothing is uploaded and there is no server.
Use it when you need a neutral starting point to scope a refactoring conversation with a team: it turns "this module feels messy" into named metrics everyone can argue about.
Don't rely on it when the number is expected to be an actual dollar figure. Real refactoring cost depends on team velocity, test coverage, and business constraints — none of which a browser heuristic can see. Two codebases with identical scores can have very different real debt, and a high score is not by itself evidence that a rewrite is justified.
The essential refactor-queue and file-level debt ratio use fixed weightings this tool defines. They are transparent and reproducible here, but they are one model, not a standard.
Bottom line: useful for framing and rough-comparison triage; the numbers it produces are estimates with real uncertainty that this page does not currently quantify.