# PVS-Studio ROI: how not to lose millions of

From time to time we are asked the question of how much money the company will benefit from using the PVS-Studio analyzer. I decided to implement the ROI calculator on the website and place a detailed description of its principles of operation. But before that, I decided to submit my thoughts and calculations for discussion. I hope to receive interesting and useful comments that will help make the calculator as reliable and convincing as possible.

We offer you a description of a calculator that allows you to calculate the return on investment from using the PVS-Studio code analyzer in the development process.

a few days .

For empirical reasons for the skeptic, we say that the analyzer will save at least 2 hours of a programmer per week, saving him from having to look for bugs found by unit tests or by the testing department. Yes, the bug fix itself usually takes minutes, but attempts to reproduce the problem, correspondence in the bugrecker, test runs, merge, and so on will easily eat these 2 hours.

Considering that sometimes the analyzer can prevent the appearance of hard-to-reproduce 3r3111. Heisenbags
, the average value is quite possible to specify 3 hours.

About 52 weeks in a year. The analyzer saves the following hours of this programmer’s work per year: 3r3-33170.
3r? 3175. skepticism about static analysis: 2 hours * 52 = 104 hours saved

3r? 3175. positive attitude: 3 hours * 52 = 156 hours saved

3r3178.

## It's time to take ROI

Then the use of PVS-Studio by one programmer with a salary of 10?000 rubles will be returned to the business per year:

3r? 3175. If you are skeptic: 1660 rubles /hour * 104 hours = ??? rubles

3r? 3175. Actually: 3750 rubles /hour * 156 hours = ??? rubles

3r3178.

Now let's take a typical development team of 10 people. Having implemented PVS-Studio, one can expect that, thanks to the time saved, the team will be able to perform useful work with a cost of: 3r-3170.
3r? 3175. Skeptic: ??? rubles

3r? 3175. Reality: ?85?000 rubles

3r3178.

## The final formula is

So now let's combine everything into a single formula that is used in the calculator.

Denote the monthly salary of a programmer as S.

The number of programmers in a team is denoted as N. 3r3-3170.
3r? 3175. The formula for the skeptic is: N * (S /160) * ??? * 104

3r? 3175. The real formula is: N * (S /160) * 6 * 156

3r3178.

Now we give in the form of tables calculations for teams of other sizes. The table shows the predicted amount of money that the development team for the company can make if, instead of editing the bugs, it is busy creating something new. These numbers should be compared with the cost of the license.

Top line: the number of programmers in a team. Left column: developer salaries.

Table for skeptics:

3r3194.

Table N1. Skeptic. Red: using PVS-Studio may be unjustified. Green: using a static analyzer is justified and useful. Blue: use is definitely beneficial.

Real table:

Table N2. Reality. Red: using PVS-Studio may be unjustified. Green: using a static analyzer is justified and useful. Blue: use is definitely beneficial.

The second table, in my opinion, is reliable, and it is reasonable for her to be guided in assessing the economic feasibility of acquiring a license.

## Note

Of course, the above calculations are not always appropriate and not everywhere. For example, if the cost of errors and vulnerabilities for a project is extremely high, then there is no point in associating the value of using PVS-Studio with the programmer's salaries. In such projects, possible monetary and reputational losses should be assessed and already associated with a reduced risk when using a code analyzer. This is a separate story, and I still do not know how to approach it in terms of calculations.

Also, the calculations may not work for outsourcing companies. This may not sound very nice, but such companies are interested in selling as many hours as possible for development, testing and maintenance. In a sense, the use of the analyzer can only reduce their revenue. This is indirectly confirmed by the fact that there are no outsourcing companies among the clients of PVS-Studio. Plus, in such companies sometimes strange processes can occur at first glance. The company at the time of low load can take a project even at a loss. This is better than dismissing some developers on vacation. Let them be better in business and busy with something.

Conclusion 3r33240.

So, although the calculations may not be suitable for all companies, I hope that I was able to demonstrate how to approach the assessment of the efficiency of using PVS-Studio from the point of view of the business as a whole.
+ 0 -