Skip to content
This documentation applies to Codacy Self-hosted v3.4.0

For the latest updates and improvements, see the latest Cloud documentation instead.

What are the different grades and how are they calculated?

1. Overall Grade

Codacy gives an overall grade to help you better understand the quality of your repository. Grades range from A to F, A being the highest grade.

Note the grading is performed on a branch level, to give a better understanding of the code quality on a branch basis.

2. Category Grades

Issue classification is as follows:

  • Code Style
  • Compatibility
  • Error Prone
  • Performance
  • Security
  • Unused Code

Every issue impacts the grade of its category. Category grading ranges from 0% - 100%, 100% being the highest grade.

3. File Grades

File grades range from A to F, A being the highest grade.

Grading every file occurs according to the weighted average of the following categories:

  • issues
  • clones
  • complexity
  • coverage (optional)

4. Grade Calculation

Codacy calculates grades based on the number of issues for every thousand lines of code (KLOC). Steve McConnell, in his book 'Code Complete,' wrote about average bugs per LOC:

(a) Industry Average: "about 15–50 errors per 1000 lines of delivered code." He further states this is usually representative of code that has some level of structured programming behind it but probably includes a mix of coding techniques.

Share your feedback 📢

Did this page help you?

Thanks for the feedback! Is there anything else you'd like to tell us about this page?

We're sorry to hear that. Please let us know what we can improve:

Alternatively, you can create a more detailed issue on our GitHub repository.

Thanks for helping improve the Codacy documentation.

If you have a question or need help please contact support@codacy.com.

Last modified February 11, 2021