How to find SPL of a WAV file given a calibration tone in WAV format
The calibration file and the file you want to analyze should be captured on the same equipment and the same conditions. A reference will be obtained in a free space environment, no echoes, and far field. If you have a room impulse response, you can usually do a reasonable correction but the collection equipment should be nearly the same. 
Most cheap SPL meters are usually A weighted. 

There are also different ways conventions on how to report SPL. In Underwater Acoustics, we usually report dB ref 1 micro pascal in a 1 Hz band, so you need to correct your levels by the ENBW of the filter (fft bin)

There's a section in Kinsler and Fry's Fundamentals of Acoustics on converting levels for different frequency bands. Noise adds as 10log and signal adds as 20 log. I recommend you look at the book.