Actually for ca.6h. We went by Viking Line, but the same cruises arranges Tallink Silja Line. The whole cruise lasts ca.40h. Departures are daily around 17pm from Helsinki, next day is for visiting the city and way back around 17pm as well.
Information in English is available on the ferries companies' websites altogether with possibility of booking and buying tickets online.
Below are some of my pictures from beautiful Stockholm in winter: (only on the second photo Silja Line is leaving Helsinki)