The function of SLC9A4 (solute carrier family 9 member A4, ENSG00000180251) is as follows. Electroneutral antiporter that exchanges sodium for protons or ammonium ions at the basolateral membrane of epithelia to regulate cell volume and intracellular pH upon hypertonic conditions (By similarity). As part of transcellular ammonia transport in renal tubules, mediates basolateral ammonium extrusion in the medullary thick ascending limb, regulating the corticopapillary ammonium gradient and overall renal acid excretion (By similarity). Mediates sodium:proton exchange in gastric parietal cells secondary to cAMP-dependent acid secretion and hyperosmolarity. Possibly coupled to chloride:bicarbonate antiporter, enables loading of parietal cells with sodium and chloride ions to maintain cell volume and normal gastric acid secretion (By similarity). Functions as a sodium sensor in neurons of organum vasculosum of the lamina terminalis where it regulates water intake in response to increased sodium concentration in body fluids (By similarity). {ECO:0000250|UniProtKB:P26434, ECO:0000250|UniProtKB:Q8BUE1}.