Detecting cancer and as well as classifying the stages of the cancer are the most important part for prognosis and imparting rightful clinical treatment. Study shows that numerous computational models have already been developed which are performing well enough for early detection and prediction of the disease; however, despite considerable efforts and progress, there remains a lack for accurately identifying the stages during the time of detection of the disease. The objective and notable approach of our study are to analyze the clinical data to accurately classify the tumor (T) stages of cancer at the time of detection. Here, in this work, we have proposed a model based on the standard tumor, node, metastasis (TNM) model and identified some important factors (IFs) (perimeter, area, radius, etc.) from the dataset with the help of state-of-the-art standard ML/DL algorithms. Thereafter, to identify the T stages of the cancer, the proposed model finds some additional influential factors (such as concavity, texture, compactness) which are highly correlated with some important factor like circumferential measurement. The accuracy, specificity, sensitivity, recall, and F score are measured for the prediction of disease and compared with previous experimental results of early detection which shows that our model performs better than others. Finally, after accurately classifying the stages, the accuracy of each of the cancer T stages has been calculated with three datasets. The accuracy of each stage of the proposed model for three dataset shows that for breast cancer, the outcome is T1-95.1%, T2-99.3%, and T3-100%; for lung cancer, it is T1-98.7% and T2 and T3-100%; and for prostate cancer, it is T1-92.1%, T2-95.4%, and T3-96%.