The liver is the second largest (after the skin) organ in the human body and the largest gland (weighing an average of 1500 g). It lies under the diaphragm in the right upper abdomen and midabdomen and extends to the left upper abdomen. The liver has the general shape of a prism or wedge, with its base to the right and its apex to the left (see the image below). It is pinkish brown in color, with a soft consistency, and is highly vascular and easily friable.  Confusion surrounds the nomenclature of liver anatomy. The International Hepto-Pancreato-Biliary Association (IHPBA) terminology of liver anatomy and resections is followed by most liver surgeons.
Embryologically, the liver grows as a ventral diverticulum from the junction of foregut and the midgut into the ventral mesogastrium (the caudal part of the septum transversum; the cranial part forms the diaphragm). The same diverticulum forms the gallbladder and bile ducts as well. The ligamentum teres hepatis is the obliterated umbilical vein, which joins the left portal vein; the ligamentum venosum is the obliterated ductus venosus, which joins the left portal vein to left hepatic vein.
The upper surface of the liver is percussed at the level of the fifth intercostal space. Superior, anterior, posterior and right surfaces of the liver are continuous with each other and are related to the diaphragm and anterior abdominal wall.
The anterior surface is separated from the inferior (visceral) surface by a sharp anterior (inferior) border that is clinically palpable on deep inspiration. The inferior surface is related to the hepatic flexure (the area where the vertical ascending (right) colon takes a right-angle turn to become the horizontal transverse colon), right kidney, transverse colon, duodenum and stomach. The gallbladder straddles the undersurfaces of liver segments IVB and V.
There is an H-shaped fissure on the inferior surface of the liver. The right vertical arm of the H is formed by the gallbladder anteriorly and the inferior vena cava (IVC) posteriorly; it is incomplete, with the caudate process between the two. The left vertical arm of the H is formed by the ligamentum teres hepatis in front and the ligamentum venosum behind.
The transverse limb of the H is the porta hepatis (hilum), a 5-cm transverse fissure (slit) on the undersurface of the liver with the quadrate lobe in front and the caudate lobe behind. It contains the common hepatic duct (CHD) in front and to the right, the proper hepatic artery in front and to the left, and the portal vein behind, enclosed in the hepatoduodenal ligament (HDL), composed of 2 layers of lesser omentum.
Anatomically, the liver is divided into a larger right lobe and a smaller left lobe by the falciform ligament (see the image below). This division, however, is of no use surgically.
The surface of the liver is covered by visceral peritoneum (serosa), with a Glisson capsule underneath. At the porta hepatis, the Glisson capsule travels along the portal tracts (triads), carrying branches of the hepatic artery, the portal vein, and the bile ducts into the liver substance.
Sinusoids are large-diameter capillaries lined by endothelial cells between rows of plates or cords of hepatocytes. Sinusoids also contain Kupffer cells of the reticuloendothelial system (RES). Each hexagonal lobule has a central portal tract with branches of the hepatic artery, the portal vein, and bile ducts, as well as a peripheral tributary of the hepatic vein. Bile canaliculi between hepatocytes drain into bile ductules in the portal triad. Bile ductules then form several orders of intrahepatic bile ducts, in an arrangement resembling the twigs and branches of a tree.
Natural variants in liver anatomy are as follows (These variants can be replaced, in which case no normal artery is present, or they can be accessory, in which case an anomalous artery is present in addition to a normal artery.):
Anomalous right hepatic artery (RHA) from superior mesenteric artery (SMA)
Anomalous left hepatic artery (LHA) from left gastric artery (LGA)
Aberrant right posterior sectoral duct joining the left hepatic duct (can be damaged during left hepatectomy)
Aberrant right segmental, sectoral or even main hepatic duct joining the common hepatic duct below the biliary ductal confluence in the Calot triangle (can be injured during cholecystectomy)
The left portal pedicle lies at the base of segment IV and has a long extrahepatic course. The right portal pedicle has a short extrahepatic course; it divides into a right anterior sectoral pedicle which lies in the gallbladder fossa and a right posterior sectoral pedicle, which lies in the Rouviere sulcus.
In cirrhosis, the superoinferior span (between the upper percussible border and the lower palpable border) of the liver, which is normally 12-16 cm, is reduced. Caudate lobe hypertrophies can occur in cirrhosis.
Lobar, sectoral, and segmental liver resection (ie, lobectomy, sectorectomy, and segmentectomy) can be performed (eg, right hepatic lobectomy [segments V-VIII], left hepatic lobectomy [segments II-IV], right posterior sectorectomy [segments VI, VII]). Liver lobes (right or left) can be removed from a live donor and transplanted to another person. Intraoperative ultrasonography may delineate intrahepatic blood vessels (eg, hepatic artery, portal vein, and hepatic vein) and bile ducts and is a very useful tool for liver resections.
Liver has enormous capacity of regeneration; normal liver can tolerate major liver resections involving up to 70-75% of liver parenchyma.
Liver cancer (hepatocellular carcinoma) drains into hepatic lymph nodes at the porta hepatis and into the lymph nodes in the hepatoduodenal ligament.
A hepatocellular carcinoma is supplied mainly by the hepatic artery. Unresectable tumors can be treated with transarterial embolization (TAE), transarterial chemo-embolization (TACE), and transarterial radio embolization (TARE).
The liver has a dual (arterial and portal) blood supply. The hepatic artery can be ligated or embolized; the liver then gets its arterial blood supply from the diaphragm and abdominal wall through its ligaments and the bare area.
Unilateral portal vein embolization results in atrophy of ipsilateral lobe and hypertrophy of contralateral lobe. This is useful before major liver resections to increase the functional liver remnant (FLR).