This paper presents an analytic solution for aerodynamic noise generated by an unsteady wall pressure gust interacting with a spanwise-variable trailing edge in a background steady uniform flow. Viscous and nonlinear effects are neglected. The Wiener–Hopf method is used in conjunction with a non-orthogonal coordinate transformation and separation of variables to permit analytical progress. The solution is obtained in terms of a tailored modal expansion in the spanwise coordinate; however, only finitely many modes are cut-on, therefore the far-field noise can be quickly evaluated. The solution gives insight into the potential mechanisms behind the reduction of noise for plates with serrated trailing edges compared to those with straight edges. The two mechanisms behind the noise reduction are an increased destructive interference in the far field, and a redistribution of acoustic energy from low cut-on modes to higher cut-off modes. Five different test-case trailing-edge geometries are considered. The analytic solution identifies which geometries are most effective in different frequency ranges: geometries which promote destructive interference are best at low frequencies, whilst geometries which promote a redistribution of energy are better at high frequencies.