A formulation of optimal stochastic design of mechanisms considering tolerances on the link lengths and clearances in the joints is presented. The mechanical error is analyzed for the 3σ band of confidence level through a new stochastic model of a four-bar linkage. A multiobjective optimization problem with two objective functions, mechanical error and manufacturing cost, is considered by a weighting method. Tolerance widths and nominal clearance sizes are taken as design variables. The conflicting nature between the two objectives is represented in the form of tradeoff curves. A concept of loop closure error is also introduced and applied to optimum design of the nominal linkage system and the stochastic linkage system. Numerical results are given for a four-bar function generator and a four-bar path generator.