This study presents a prediction method of surface roughness values for dry and cryogenic turning of AISI 304 stainless steel using the ANFIS-QPSO machine learning approach. ANFIS-QPSO combines the strengths of artificial neural networks, fuzzy systems and evolutionary optimization in terms of accuracy, robustness and fast convergence towards global optima. Simulations revealed that ANFIS-QPSO results in accurate prediction of surface roughness with RMSE = 4.86%, MAPE = 4.95% and R2 = 0.984 for the dry turning process. Similarly, for the cryogenic turning process, ANFIS-QPSO resulted in surface roughness predictions with RMSE = 5.08%, MAPE = 5.15% and R2 = 0.988 that are of high agreement with the measured values. Performance comparisons between ANFIS-QPSO, ANFIS, ANFIS-GA and ANFIS-PSO suggest that ANFIS-QPSO is an effective method that can ensure a high prediction accuracy of surface roughness values for dry and cryogenic turning processes.