GaussFit solves least squares and robust estimation problems; written originally for reduction of NASA Hubble Space Telescope data, it includes a complete programming language designed especially to formulate estimation problems, a built-in compiler and interpreter to support the programming language, and a built-in algebraic manipulator for calculating the required partial derivatives analytically. The code can handle nonlinear models, exact constraints, correlated observations, and models where the equations of condition contain more than one observed quantity. Written in C, GaussFit includes an experimental robust estimation capability so data sets contaminated by outliers can be handled simply and efficiently.