Exhibit 5 Kramer, Coleman, Wactlar & Lieberman, P.C. ATTORNEYS AT LAW 100 Jericho Quadrangle Jericho, New York 11753 (516) 822-4820 June 18, 2003 Netsmart Technologies, Inc. 146 Nassau Avenue Islip, New York 11751 Re: Netsmart Technologies, Inc. Registration Statement on Form S-3/A ------------------------------------ Dear Sirs/Madams: We have acted as counsel for Netsmart Technologies, Inc., a Delaware corporation (the "Company"), in connection with the registration under the Securities Act of 1933, as amended, of (i) an aggregate of 110,000 shares of common stock, par value $.01 per share, of the Company ("Common Stock"), issued or issuable upon exercise of Series E Common Stock Purchase Warrants of the Company ("Warrants") issued pursuant to a Business Advisory and Consulting Agreement, with the Company dated April 10, 2002 and (ii) 10,000 shares of Common Stock issued upon the exercise of non-qualified stock options ("Options") issued pursuant to a Consulting Agreement with the Company dated February 16, 2001. In this regard, we have participated in the preparation of a Registration Statement on Form S-3 (the "Registration Statement") relating to the Common Stock. We are of the opinion that: (1) the shares of Common Stock subject to the Registration Statement have been duly authorized; (2) the shares which were issued in accordance with the terms of the Options and the Warrants exercised prior to the date hereof are legally issued, fully paid and non-assessable; and (3) that the shares of Common Stock issuable upon the exercise of Warrants to be exercised, when issued in accordance with the terms of the Warrants will be legally issued, fully paid and non-assessable. We hereby consent to the filing of this opinion as Exhibit 5 to the Registration Statement and to the use of our name under the caption "Legal Matters" in the Registration Statement and in the Prospectus included therein. Very truly yours, /s/Kramer Coleman, Wactlar & Lieberman, P.C. -------------------------------------------- Kramer, Coleman, Wactlar & Lieberman, P.C.