This paper introduces a duality theorem that is useful in identifying the dual functional form to an arbitrary cost or distance function. It is shown that the distance function dual to an arbitrary cost function is the reciprocal of the cost function with its price arguments replaced by subfunctions of quantities and utility (or output) level. Similarly, the cost function dual to an arbitrary distance function is shown to be the reciprocal of the distance function with its quantity arguments replaced by subfunctions of prices and utility (or output) level. Due to duality, it is not usually necessary to identify a dual functional form implicit in a specified model. However, in certain cases one may need to identify the dual functional form. An example would be the case where Malmquist quantity indices are to be computed while the preference ordering is represented by a nonhomothetic cost function. The theorem is applied to a few popular models for illustration.