This applet calculates the frequency response of the discrete filter function
filtered = filtered + α (sample - filtered)
See Wikipedia for details. The gain for a given frequency f is calculated with this formulas:τ = ((1 - α) / α) / samplerate
f0 = 1 / (2 π τ)
gain = 1 / sqrt(1 + (f / f0)2)
If you have the cutoff frequency f0 and the samplerate, you can calculate α like this:α=(2 f0 π) / (2 f0 π + samplerate)
Gain is displayed in dB (20 log10(gain)).
Source: FilterApplet2.java, FilterCanvas2.java