Go up 12 semi-tones from frequency f on a guitar, and the frequency interval difference in terms of f is f = 2f - f. What is the formula for the intermediate 11 non-trivial intervals? So for k=2, that's two semi-tones. If I start at frequency f on guitar, and go up two frets, what is the frequency interval length?
With g being the new frequency, f being the frequency of reference, and k being the interval in number of semitones:
g = f * 2ˆ(k/12)
k = 12 (one octave), you get
g = 2 * f.
k = 0 (unison), you get
g = f.
In between, you get an exponential curve (power of two).
For the frequency difference between g and f:
g - f = f * [2^(k/12) - 1]
Note also that k needs not be positive, and may also have decimals. If the interval you are looking for is 3 semitones and 14 cents down, take
k = -3.14.