A number of papers present exergy analyses of various wastewater treatment systems. The current development of these systems is mainly aimed at improving their energy efficiency, reducing the share of sludge subject to storage, and reducing their harmfulness. Some of these systems can be supported by the use of the cavitation phenomenon in the processing. The generation of cavitation requires, however, the use of devices or machines and thus additional energy consumption. Therefore, this treatment should be objectively justified, e.g. through exergy analysis, which takes into account not only the amount of energy used in processes, but also its quality. The paper treats the methodology for determining the impact of the use of cavitation in the exergy balance of sewage sludge treatment system. Then, it presents the results of an exemplary analysis comparing sewage sludge treatment systems (with and without application of cavitation phenomenon) in which biogas is produced during the fermentation, then burned in a co-generator, finally receiving useful energy in the form of electric current and hot flue gas stream.