Primary liver cancer (PLC) has placed an increasing economic and resource burden on the health care system of the United States. We attempted to quantify its epidemiology and associated costs using a national inpatient database. Hospital discharge and insurance claims data from the National Inpatient Sample were used to conduct this analysis. Patients diagnosed with PLC (hepatocellular carcinoma or cholangiocarcinoma) were included in the study population, which was then stratified using patient demographics, comorbidities, degree of cancer spread, liver disease complications, and other descriptors. Trends were analyzed via regression curves for each of these strata from the years 2016 to 2019, with special attention to patterns in hospitalization incidence, inpatient mortality rate, total costs, and average per-capita costs. The resulting curves were evaluated using goodness-of-fit statistics and P -values. Aggregate hospitalization incidence, inpatient mortality rates, and total costs were found to significantly increase throughout the study period ( P =0.002, 0.002, and 0.02, respectively). Relative to their demographic counterparts, males, White Americans, and those older than 65 years of age contributed the largest proportions of total costs. These population segments also experienced significant increases in total expenditure ( P =0.04, 0.03, and 0.02, respectively). Admissions deemed to have multiple comorbidities were associated with progressively higher total costs throughout the study period ( P =0.01). Of the categorized underlying liver diseases, only admissions diagnosed with alcoholic liver disease or nonalcoholic fatty liver disease saw significantly increasing total costs ( P =0.006 and 0.01), although hepatitis C was found to be the largest contributor to total expenses. From 2016 to 2019, total costs, admission incidence, and inpatient mortality rates associated with PLC hospitalization increased. Strata-specific findings may be reflective of demographic shifts in the PLC patient populations, as well as changes in underlying chronic liver disease etiologies.