I am assuming you mean publishing a book. It depends upon the subject, author's intention and the market. Here are some interesting links for further exploration.
It varies in different countries. Here is some information in UK:
The economics of academic journals publishing
To understand what is happening in the sector it is first necessary to understand how the business works. On the journal publishing side the economics are as follows: the typical publisher-owned academic journal (as opposed to journals which are owned by learned societies) has around 200 subscribers paying around £600 per year for six issues. This brings in around £120,000, of which direct costs such as printing, typesetting, marking up in HTML, distribution, copy editing, marketing and the editor's expenses and honorarium add up to around £40,000 per year. The rest goes towards the publisher's overheads. Each year 3 per cent of the subscribing libraries decide to cancel their subscriptions, either because they can't afford it any more or because their faculty is no longer interested in the relevant field.
The economics of academic book publishing
The economics of academic book publishing are very much less attractive than the economics of academic journal publishing. Typically the average academic monograph sells around 250 copies priced at £80 with an average discount to booksellers of 30 per cent. This brings in a gross £14,000. After paying for the direct costs of printing, paper, marketing, copy editing and typesetting, around £7,000 is left to go towards the editor's salary and other overheads