Can you please elaborate further on what kind of a filter you wish to implement? IIR or FIR? And what is the sampling frequency for your problem? Also is the higher frequency cutoff 40KHz or 40MHz?
You need to know more parameters about your filter such as minimum stopband attenuation, maximum passband attenuation, and possibly maximum ripple characteristics. This is required to figure out the order your filter needs to be.