The kidney functions to filter waste from the blood and regulate homeostasis. It contains nephrons, the functional units, located in the renal cortex. Nephrons filter the blood via the glomerulus, reabsorb most water and nutrients, and secrete some substances, forming urine. Urine drains from the renal pyramids and calyces into the ureters and out of the body. The kidney filters around 45 gallons of blood per day.