Trian's stake is valued at about 736 million pounds, Trian Investors 1 Ltd said in a statement on Thursday.
Ferguson's performance has been under pressure this year as cooling growth in the United States, its largest market, has weighted on shares.
Trian said it has been in talks with Ferguson's management and "looks forward to working with them to explore and implement initiatives that it believes can create long-term shareholder value."
Trian's stake would make it Ferguson's second-largest shareholder, behind BlackRock investment Management (UK) which owns a 10.46% stake, according to Refinitiv Eikon data.
Trian Investors 1 is a Guernsey-domiciled limited company, which is managed by Trian Investment Management LLC, a unit of Trian Fund.
(Reporting by Shariq Khan and Yadarisa Shabong in Bengaluru; Editing by Saumyadeb Chakrabarty and Gopakumar Warrier)