In this study, energy and exergy analysis of the Afyon geothermal district heating system (AGDHS) in Afyon, Turkey using artificial neural network (ANN) and adaptive neuro-fuzzy (ANFIS) methods is carried out. Actual system data in the analysis of the AGDHS are used. The results of ANN are compared with ANFIS in which the same data sets are used. ANN model is slightly better than ANFIS in determining the energy and exergy rates. In addition, new formulations obtained from ANN are presented for the determination of the energy and exergy rates of the AGDHS. The R-2-values obtained when unknown data were used in the networks were 0.999999847 and 0.99999997 for the energy and exergy rates respectively, which are very satisfactory. (c) 2012 Elsevier B.V. All rights reserved.