The kidney is directed to excrete or retain sodium via the action of aldosterone, antidiuretic hormone (ADH, or vasopressin), atrial natriuretic peptide (ANP), and other hormones. Abnormal ranges of the fractional excretion of sodium can imply acute tubular necrosis or glomerular dysfunction. Acid-base
Two organ systems, the kidneys and lungs, maintain acid-base homeostasis, which is the maintenance of pH around a relatively stable value. The lungs contribute to acid-base homeostasis by regulating carbon dioxide (CO2) concentration. The kidneys have two very important roles in maintaining the acid-base balance: to reabsorb and regenerate bicarbonate from urine, and to excrete hydrogen ions and fixed acids (anions of acids) into urine. Osmolality
The kidneys help maintain the water and salt level of the body. Any significant rise in plasma osmolality is detected by the hypothalamus, which communicates directly with the posterior pituitary gland. An increase in osmolality causes the gland to secrete antidiuretic hormone (ADH), resulting in water reabsorption by the kidney and an increase in urine concentration. The two factors work together to return the plasma osmolality to its normal levels. ADH binds to principal cells in the collecting duct that translocate aquaporins to the membrane, allowing water to leave the normally impermeable membrane and be reabsorbed into the body by the vasa recta, thus increasing the plasma volume of the body. There are two systems that create a hyperosmotic medulla and thus increase the body plasma volume: Urea recycling and the single effect. Urea is usually excreted as a waste product from the kidneys.
Substances mainly secreted into renal tubule are; H+, K+, NH3, urea, creatinine, histamine and drugs like penicillin. Tubular secretion occurs at Proximal Convoluted Tubule (PCT) and Distal Convoluted Tubule (DCT); for example, at proximal convoluted tubule, potassium is secreted by means of sodium-potassium pump, hydrogen ion is secreted by means of active transport and co-transport, i.e. antiporter, and ammonia diffuses into renal tubule. Other functions
Hormone secretion
The kidneys secrete a variety of hormones, including erythropoietin, calcitriol, and renin. Erythropoietin is released in response to hypoxia (low levels of oxygen at tissue level) in the renal circulation. It stimulates erythropoiesis (production of red blood cells) in the bone marrow. Calcitriol, the activated form of vitamin D, promotes intestinal absorption of calcium and the renal reabsorption of phosphate. Renin is an enzyme which regulates angiotensin and aldosterone levels. Maintaining homeostasis
The kidney is responsible for maintaining a balance of the following substances:

The body is very sensitive to its pH. Outside the range of pH that is compatible with life, proteins are denatured and digested, enzymes lose their ability to function, and the body is unable to sustain itself. The kidneys maintain acid-base homeostasis by regulating the pH of the blood plasma. Gains and losses of acid and base must be balanced. Acids are divided into "volatile acids" and "nonvolatile acids". See also titratable acid. The major homeostatic control point for maintaining this stable balance is renal excretion.