// 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.