Organic Rankine cycle (ORC) is used, amongst the others, in geothermal facilities, in waste heat recovery or in domestic combined heat and power (CHP) generation. The paper presents optimization of an idealized ORC equivalent of the Carnot cycle with non-zero temperature difference in heat exchangers and with energy dissipation caused by the viscous fluid flow. In this analysis the amount of heat outgoing from the ORC is given. Such a case corresponds to the application of an ORC in domestic CHP. This assumption is different from the most of ORC models where the incoming amount of heat is given.