The distinction between primary gastric adenocarcinoma and gastric metastatic breast carcinoma can be difficult. Expression of hepatocyte nuclear factor 4A (HNF4A) has been described as being specific to distinguish between neoplastic gastric and breast epithelial cells. The aim of this study was to validate the use of HNF4A with immunohistochemistry in discriminating gastric from breast carcinomas. Immunohistochemical expressions of HNF4A, estrogen receptor (ER), progesterone receptor (PR), and BRST-2 were determined in primary sporadic gastric adenocarcinomas (n = 107) and breast carcinomas (n = 105). The same markers and clinicopathological features were studied in 1 patient with breast metastasis of gastric cancer, 6 patients with gastric metastases of breast cancer, and 13 patients with both primary gastric and breast carcinomas. HNF4A expression was seen in 106 of 107 primary gastric adenocarcinomas and was absent in all 105 primary breast carcinomas (sensitivity 99 %, specificity 100 %). ER, PR, and BRST-2 were 100 % specific for breast carcinomas with sensitivities of 77, 58, and 38 %, respectively. The metastasis of gastric carcinoma to the breast showed strong expression of HNF4A. None of the metastases of breast carcinomas to the stomach showed expression of HNF4A. Tissues of patients with two primary carcinomas showed strong expression of HNF4A in all gastric carcinomas and no expression in breast carcinomas. Our results indicate that HNF4A is a very good marker to discriminate between primary and metastatic gastric and breast carcinomas.