Nowadays, technology plays a crucial role in fabric production in the textile industry. The demand for high-quality products and rapidly changing economic conditions increase the significance of readymade clothing manufacturers to produce the right quality product. In addition, in order to minimize production errors, to improve and maintain process performance, it is important to identify the sources of variability during manufacturing. The defective fabric is the main reason which is causing harm to the textile business. Therefore, the proper identification of manufacturing defects leads to a successful business. When it comes to extracting meaningful insights from data and knowledge discovery, data mining has proven its significance in various fields such as business, health, finance, and education. As in all other sectors, data mining is widely used in the textile sector too. In this study, it was aimed to determine the main causes of the error with defective production data of a company that produces clothing by using data mining methods. Decision Tree, Naive Bayes, Random Forest, and Gradient Boosted Trees Algorithms were used in the research. Accuracy rate and Cohen's kappa statistics were taken for comparison algorithms in the study. While determining the main reasons for defective products, the factors of which type of products the company produces for its customers, the sizes of the defective products, types of defects, and explanations were taken into consideration. The most common mistakes in sewing production and the main source of the error were evaluated. According to the results, suggestions were made for the company to take various measures.