# How does Technical Debt being calculated

**URL:** <https://community.sonarsource.com/t/how-does-technical-debt-being-calculated/38455>\
**Category:** SonarQube Server / Community Build\
**Created:** [February 10, 2021, 4:50pm UTC](https://community.sonarsource.com/t/how-does-technical-debt-being-calculated/38455 "2021-02-10T16:50:58Z")\
**Posts on this page:** 1\
**Showing post:** 5

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [April 8, 2021, 12:52pm UTC](https://community.sonarsource.com/t/how-does-technical-debt-being-calculated/38455/5 "2021-04-08T12:52:36Z")

</div>

Hey @tcsabina

Most issues in SonarQube have a remediation cost attached (estimated time to fix an issue). This could be 1m, 5m, 30m, etc… The sum of all these remediation costs for Code Smells (maintainability issues) for a project is the technical debt.

 ![Screenshot 2021-04-08 at 14.50.09](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/0/c/0ccc0ce07d719e6291bb32b11d307ad030f081a4.png)

Does such a quantitative value make sense in a Quality Gate? I don’t think so. A rocket-launcher is probably going to have more technical debt than a calculator. We would rather suggest a Quality Gate condition for the Maintainability Rating.

> **Maintainability Rating** ( `sqale_rating` )  
> (Formerly the SQALE rating.) Rating given to your project related to the value of your Technical Debt Ratio. The default Maintainability Rating grid is:
> 
> A=0-0.05, B=0.06-0.1, C=0.11-0.20, D=0.21-0.5, E=0.51-1
> 
> The Maintainability Rating scale can be alternately stated by saying that if the outstanding remediation cost is:
> 
> - \<=5% of the time that has already gone into the application, the rating is A
> - between 6 to 10% the rating is a B
> - between 11 to 20% the rating is a C
> - between 21 to 50% the rating is a D
> - anything over 50% is an E

You can always find [Metric Definitions in our docs](https://docs.sonarqube.org/latest/user-guide/metric-definitions/)

---

_[View the full topic](https://community.sonarsource.com/t/how-does-technical-debt-being-calculated/38455)._
