Its Waitrose Direct service, which sells gift items such as flowers, wine and luxury foods online, moved into profit during the year.
The £31.5m cost was split almost evenly between the group's two new ventures. John lewis.com, which launched in October 2001, took about 1,000 orders a day during the Christmas period.
Ocado, which launched six weeks ago, sells groceries online from regional distribution centres in dense conurbations. The service will be rolled out nationally over five years.
In January, the group integrated computer e-tailer Buy.com, which it acquired in February 2001, into Johnlewis.com.
"We want the site to be the size of a medium department store in five years and will invest £40m to make that happen,
said a company spokesman.