The fee, which makes Stones the most expensive defender in Premier League history, will increase to £50m with add-ons. That would match the amount Paris Saint-Germain paid Chelsea for David Luiz, currently the most expensive defender in the world.
The transfer will also benefit Barnsley, who have confirmed they included a sell-on clause when they sold Stones to Everton. The exact amount they will receive has not been disclosed.
Stones told the club’s website: “I’m absolutely delighted to sign for City and now the deal’s done I’m looking forward to the next stage in my career.
“I’ve obviously seen what’s going on here at the Etihad, it’s an ambitious Club with a great manager so I can’t wait to get stuck in and help achieve the goals.
“I know it will be tough getting a place in this team but I’m determined to become the best player I can be and help us to success.