People of all ages enjoy chocolate, and its popularity is attributed to its pleasant taste and aroma, as well as its associated health benefits. Produced through both artisanal and industrial processes, which involve harvesting, selecting, fermenting, roasting and grinding cocoa beans, chocolate has a diverse chemical composition. It contains stimulants for the central nervous system, including caffeine and theobromine, and antioxidants and flavonoids, some of which are associated with promoting cardiovascular health, circulatory function, alertness, and attention. This study aimed to use NIR spectroscopy to determine whether this technique can effectively quantify the percentage of cocoa present in commercial chocolates. In the exploratory analysis of the NIR spectra, conducted in the range of 900-1600 nm, it was observed that the cocoa percentage in the samples correlated most strongly with chemical groups exhibiting absorbance in the range of 900-1400 nm. Principal Component Analysis (PCA) exhibited good discriminatory ability between samples with different cocoa percentages. Kohonen neural networks have also been proven effective in processing high-dimensional nonlinear data and complementing PCA analysis in pattern recognition. Additionally, Principal Component Regression (PCR) was performed to evaluate the predictive capability of cocoa percentage based on NIR spectra, yielding an R2 value of 0.84. The study demonstrates that integrating the NIR spectra with PCA/PCR and KNN enables cocoa percentage identification, making it a valuable tool for chocolate quality control and authenticity assurance.