This paper presents a novel strategy for computing mathematical functions with molecular reactions, based on theory from the realm of digital design. It demonstrates how to design chemical reaction networks based on truth tables that specify analog functions, computed by stochastic logic. The theory of stochastic logic entails the use of random streams of zeros and ones to represent probabilistic values. A link is made between the representation of random variables with stochastic logic on the one hand, and the representation of variables in molecular systems as the concentration of molecular species, on the other. Research in stochastic logic has demonstrated that many mathematical functions of interest can be computed with simple circuits built with logic gates. This paper presents a general and efficient methodology for translating mathematical functions computed by stochastic logic circuits into chemical reaction networks. Simulations show that the computation performed by the reaction networks is accurate and robust to variations in the reaction rates, within a log-order constraint. Reaction networks are given that compute functions for applications such as image and signal processing, as well as machine learning: arctan, exponential, Bessel, and sinc. An implementation is proposed with a specific experimental chassis: DNA strand displacement with units called DNA “concatemers”.