With a 5-year survival of ˂ 10%, pancreatic cancer is one of the leading causes of cancer-related deaths. Given the role of the distribution of tumor-infiltrating lymphocyte (TILs) subtypes in the tumor and its microenvironment in predicting prognosis, the development of new targeted therapies based on T-cell adaptive response has gained considerable attention. This study aimed to examine the peritumoral spread of TILs and its relationship with other prognostic parameters and survival. This study included 60 patients with pancreatic cancer who had undergone surgery with follow-up between 2011 and 2021. Demographic characteristics, tumor histopathological features, peritumoral TILs counts, and intratumoral programmed cell death protein-1 (PD-1) and programmed death ligand − 1 (PD-L1) positivity were evaluated. Furthermore, overall survival and their efficacy in predicting survival according to TNM stage were analyzed. The number of cluster differentiation-3 positive (CD3 P) TILs increased with advancing pathological T stage. CD3 P and CD8 P TIL counts were higher in patients with peripancreatic fatty tissue invasion. Patients with PD-L1 positivity and higher TIL counts had better survival rates. PD-L1-negative patients with a low CD8 positive/total lymph node count (P/T) ratio had a longer survival. Moreover, patients with poorly differentiated tumors with low CD3 P/T and CD8 P/T ratios had a longer survival. The CD3 P/T and CD8 P/T ratios were compatible with the automatic and manual measurements. Age, tumor differentiation, N stage, and peritumoral TIL count and subtype, when evaluated together with the presence of PD-L1 in the tumor tissue, may have prognostic significance for survival in patients with pancreatic cancer.