Helios-r2 performs atmospheric retrieval of brown dwarf and exoplanet spectra. It uses a Bayesian statistics approach by employing a nested sampling method to generate posterior distributions and calculate the Bayesian evidence. The nested sampling itself is done by Multinest (ascl:1109.006). The computationally most demanding parts of the model have been written in NVIDIA's CUDA language for an increase in computational speed. Successful applications include retrieval of brown dwarf emission spectra and secondary eclipse measurements of exoplanets.