A cytochrome P450 monooxygenase involved in the metabolism of sterols, steroid hormones, retinoids and fatty acids (PubMed:10681376, PubMed:11093772, PubMed:11555828, PubMed:12865317, PubMed:14559847, PubMed:15373842, PubMed:15764715, PubMed:19965576, PubMed:20702771, PubMed:21490593, PubMed:21576599). Mechanistically, uses molecular oxygen inserting one oxygen atom into a substrate, and reducing the second into a water molecule, with two electrons provided by NADPH via cytochrome P450 reductase (NADPH--hemoprotein reductase). Catalyzes the hydroxylation of carbon-hydrogen bonds (PubMed:12865317, PubMed:14559847, PubMed:15373842, PubMed:15764715, PubMed:21490593, PubMed:21576599, PubMed:2732228). Exhibits high catalytic activity for the formation of hydroxyestrogens from estrone (E1) and 17beta- estradiol (E2), namely 2-hydroxy E1 and E2, as well as D-ring hydroxylated E1 and E2 at the C-16 position (PubMed:11555828, PubMed:12865317, PubMed:14559847). Plays a role in the metabolism of androgens, particularly in oxidative deactivation of testosterone (PubMed:15373842, PubMed:15764715, PubMed:22773874, PubMed:2732228). Metabolizes testosterone to less biologically active 2beta- and 6beta- hydroxytestosterones (PubMed:15373842, PubMed:15764715, PubMed:2732228). Contributes to the formation of hydroxycholesterols (oxysterols), particularly A-ring hydroxylated cholesterol at the C- 4beta position, and side chain hydroxylated cholesterol at the C-25 position, likely contributing to cholesterol degradation and bile acid biosynthesis (PubMed:21576599). Catalyzes bisallylic hydroxylation of polyunsaturated fatty acids (PUFA) (PubMed:9435160). Catalyzes the epoxidation of double bonds of PUFA with a preference for the last double bond (PubMed:19965576). Metabolizes endocannabinoid arachidonoylethanolamide (anandamide) to 8,9-, 11,12-, and 14,15- epoxyeicosatrienoic acid ethanolamides (EpETrE-EAs), potentially modulating endocannabinoid system signaling (PubMed:20702771). Plays a role in the metabolism of retinoids. Displays high catalytic activity for oxidation of all-trans-retinol to all-trans-retinal, a rate- limiting step for the biosynthesis of all-trans-retinoic acid (atRA) (PubMed:10681376). Further metabolizes atRA toward 4-hydroxyretinoate and may play a role in hepatic atRA clearance (PubMed:11093772). Responsible for oxidative metabolism of xenobiotics. Acts as a 2-exo- monooxygenase for plant lipid 1,8-cineole (eucalyptol) (PubMed:11159812). Metabolizes the majority of the administered drugs. Catalyzes sulfoxidation of the anthelmintics albendazole and fenbendazole (PubMed:10759686). Hydroxylates antimalarial drug quinine (PubMed:8968357). Acts as a 1,4-cineole 2-exo-monooxygenase (PubMed:11695850). Also involved in vitamin D catabolism and calcium homeostasis. Catalyzes the inactivation of the active hormone calcitriol (1-alpha,25-dihydroxyvitamin D(3)) (PubMed:29461981). {ECO:0000269|PubMed:10681376, ECO:0000269|PubMed:10759686, ECO:0000269|PubMed:11093772, ECO:0000269|PubMed:11159812, ECO:0000269|PubMed:11555828, ECO:0000269|PubMed:11695850, ECO:0000269|PubMed:12865317, ECO:0000269|PubMed:14559847, ECO:0000269|PubMed:15373842, ECO:0000269|PubMed:15764715, ECO:0000269|PubMed:19965576, ECO:0000269|PubMed:20702771, ECO:0000269|PubMed:21490593, ECO:0000269|PubMed:21576599, ECO:0000269|PubMed:22773874, ECO:0000269|PubMed:2732228, ECO:0000269|PubMed:29461981, ECO:0000269|PubMed:8968357, ECO:0000269|PubMed:9435160}. This is the function of CYP3A4 (cytochrome P450 family 3 subfamily A member 4, Ensembl gene identifier ENSG00000160868).