This paper presents a methodology for synthesizing planar linkages to approximate any prescribed periodic function. The mechanisms selected for this task are the slider-crank and the geared five-bar with connecting rod and sliding output (GFBS), where any number of double-crank (or drag-link) four-bars are used as drivers. A slider-crank mechanism, when comparing the input crank rotation to the output slider displacement, produces a sinusoid-like function. Instead of directly driving the input crank, a drag-link four-bar may be added to drive the crank from its output via a rigid connection between the two. Driving the input of the added four-bar results in a function that modifies the sinusoid-like curve. This process can be continued through the addition of more drag-link mechanisms to the device, progressively altering the curve toward any periodic function with a single maximum. For periodic functions with multiple maxima, a GFBS is used as the terminal linkage added to the chain of drag-link mechanisms. The synthesis process starts by analyzing one period of the function to design either the terminal slider-crank or terminal GFBS. matlab's fmincon command is then utilized as the four-bars are added to reduce the structural error between the desired function and the input–output function of the mechanism. Mechanisms have been synthesized in this fashion to include a large number of links that are capable of closely producing functions with a variety of intriguing features.