Stoke have been tracking the 19-year-old for some time and have been able to make the move official after Sobhi was granted a work permit to play in England.
Sobhi joins from Egyptian club Al Ahly, who won the Egyptian title last season.
The winger played 64 times for Al Ahly, scoring 14 goals and also has six caps for Egypt.
Stoke's chief executive Tony Scholes said: "We are absolutely delighted to have signed a player of Ramadan’s undoubted quality and potential.
"He’s a special young talent who is excited about the prospect of making an impact in the Premier League and we’re looking forward to giving him that platform".