One scheme for harmonic generation employs free electron lasers (FELs) with two undulators: the first uses a seed laser to modulate the energy of the electron beam; following a dispersive element which acts to bunch the beam, the second undulator radiates at a higher harmonic. These processes are currently evaluated using extensive calculations or simulation codes which can be slow to evaluate and difficult to set up. We describe a simple algorithm to predict the output of a harmonic generation beamline in the low-gain FEL regime, based on trial functions for the output radiation. Full three-dimensional effects are included. This method has been implemented as a Mathematica package, named CAMPANILE, which runs rapidly and can be generalized to include effects such as asymmetric beams and misalignments. This method is compared with simulation results using the FEL code GENESIS, both for single stages of harmonic generation and for the LUX project, a design concept for an ultrafast X-ray facility, where multiple stages upshift the input laser frequency by factors of up to 200.