While much can always be said, I summarized before the basic information on the travel on the Empire Route [between UK and the Far East via Suez Canal] in the late 19th century in:
+++
In short answer, the minimum traveling time between Europe and Japan by way of Suez Canal since 1870s would be a little less than 2 months, around 50 days without the transit time.
In 1870
This date can be a bit problematic, though. Since it was just after the Meiji Restoration in 1868, OP would have to rely mainly not on the passenger ship, but on the postal ship between Europe and Asia (and within Asia, Shanghai or Hong Kong and Japan).
In 1860s and the early 1870s, British P&O: Peninsular and Oriental Steam Navigation Company and French Messageries Maritimes were only two of such (civilian) postal ship companies that connected Europe and Japan.
It took about 5 days between Shanghai and Japan, and around 10 days if OP boarded a direct route from Hong Kong and Japan (Cf. Sawa 1984).
Sawa also makes a note on the passenger fare of the postal ship (Sawa 1984: 110, 134): In 1870, the 1st class of French Messageries Maritimes between Marseilles (France) and Yokohama costed $550, but the company introduced the budget price in the next year [1871] in order to keep up with their rival, British P&O, whose fare between Yokohama and Brindisi, Italy, was $455. In 1878, the fare of each passenger class [between Marseilles/ Naples and Yokohama] were: $440 (discounted to $374 specially for Japanese officials) for the 1st class, $330 for the 2nd class (discounted to $280), and $199 for the 3rd class (discounted to $169).
(Added): NB: Sawa might be a bit confused on the currency above (USD or Mexican peso Cf. [Sawa 1984: 134]), so we have to take a grain of salt on the fares mentioned above.
As for the traveling time between Europe and Hong Kong, I have by chnce found the closest example: A Danish businessman, Eduard Suenson of Det Store Nordiske Telegraf-Selskab (GNTC: The Great Northern Telegraph Company) left Copenhagen probably on Apr. 03, 1870 (together with other executive of the same company [Madsen 1910: 295]) and got to Hong Kong by the middle of May in the same year, for their business on extending the network of (underwater) telegraph cables among some Asian centers like Vladivostok, Shanghai, and Japan (Nagasaki) (Nagashima trans. 2003: 262).
Suenson finally landed on Japan on July (, 1870), after some negotiations conducted in Shanghai. It was in fact his second visit in Japan within around 5 years, since he had been had already been in Japan as one of French military officers before the Meiji Restoration, in 1866-67. Thus, it took around 3 months in total, including some business and transit in Shanghai, in this case of Suenson in 1870.
NB: I'm not specialized in the traveling time within Europe in the late 19th century, however, so you'd have to add how long it took to travel from Berlin either to London or to Marseilles where the postal ship departed for, by yourself.
Additional References:
+++