The approach is quite simplistic, we model the inductor as a pure inductance `L` with an unknown parasitic distributed capacitance `C_d`. We apply the two testing capacitances `C_1` and `C_2`, giving total resonating capacitances of `C_x = C_1 + C_d` and `C_y = C_2 + C_d` with measured resonating frequencies `f_1` and `f_2`.
At LC resonance `f = 1 / (2 pi sqrt(L C))`, therefore `L = 1 / ((2 pi f)^2 C)`.
`L` is constant, so `(2 pi f_1)^2(C_d + C_1) = (2 pi f_2)^2(C_d + C_2)` which solved for `C_d` gives us:
`C_d = (f_2^2 C_2 - f_1^2 C_1) / (f_1^2 - f_2^2)`
The units for frequency and capacitance are not important, as long as they are the same for both data points. The resulting `C_d` will be in the same units as `C_1` and `C_2`.