BornAgain is a free and open-source multi-platform software framework for simulating and fitting X-ray and neutron reflectometry, off-specular scattering, and grazing-incidence small-angle scattering (GISAS). This paper concentrates on GISAS. Support for reflectometry and off-specular scattering has been added more recently, is still under intense development and will be described in a later publication. BornAgain supports neutron polarization and magnetic scattering. Users can define sample and instrument models through Python scripting. A large subset of the functionality is also available through a graphical user interface. This paper describes the software in terms of the realized nonfunctional and functional requirements. The web site https://www. bornagainproject.org/ provides further documentation.