Imagine I have 2 audio files. They contain same audio but one of them was amplified using Amplify effect of Audacity. I don't know the value used. Is it possible to calculate exact dB value used to change one file comparing it with original? How?
Try amplify in the second file. The dB needed will bring it to the first files level.
Now if you compress or process the files otherwise the amount might be different than just amplify would use without the processing.
Note that while the levels are the same the loudness may well differ. See LUFs to learn more about loudness standards and how they differ from levels.