If the filter coefficients of IIR or FIR filter are known, the black box character, which is the curve of amplitude and phase with continuous frequency can be obtained. Whether for integration、 double-integration、differential、double differential and filter, there are theoretical black box performance curves. The more the black box characteristic of the designed IIR or FIR filter close to the theoretical curve, the better the algorithm is. In this paper,according to the optimal black box design, the shortcoming of traditional calculus algorithm are pointed out,the improved algorithms with best black box characteristic are provided; The innovation theory of FIR best black box are proposed that can obtain the FIR coefficients for calculus and filter. The integration characteristic of IIR is also discussed.