Hospitals are under increasing pressure to improve service quality while maintaining financial sustainability under Indonesia’s National Health Insurance (JKN) reimbursement system. Clinical Pathway (CP) implementation and Length of Stay (LOS) are considered important strategies for improving cost efficiency, yet their financial impact remains inconsistent across healthcare settings. Previous studies have primarily examined the influence of Clinical Pathway implementation on service quality or Length of Stay separately. In contrast, evidence regarding the combined effects of Clinical Pathway compliance and Length of Stay on hospital cost efficiency, particularly in Type D hospitals, remains limited. This study aimed to analyse the effects of Clinical Pathway compliance and Length of Stay on cost efficiency among inpatients at Marsudi Waluyo Hospital, Malang Regency, using Gross Profit Margin (GPM) as the indicator of cost efficiency. A quantitative study with an observational, analytic, and retrospective design was conducted using secondary data from medical records, Clinical Pathway forms, hospital information systems, billing records, and casemix data. The study included 361 inpatient care episodes selected through total sampling. Multiple linear regression was employed to examine the relationships among variables, and bootstrap analysis with 1,000 resamples was applied to enhance the robustness of the estimates. Clinical Pathway compliance significantly affected Gross Profit Margin (β = −0.341, p = 0.029), while Length of Stay also showed a significant negative effect (β = −10.385, p < 0.001). Simultaneously, both variables significantly influenced Gross Profit Margin (F = 30.800, p < 0.001), explaining 14.7% of its variance (R² = 0.147). Length of Stay demonstrated a stronger influence on cost efficiency. This study also contributes empirical evidence on hospital cost efficiency in a Type D hospital and provides practical guidance for hospital managers in developing evidence-based cost-control strategies.