

                               BUCHANAN INGERSOLL
                            PROFESSIONAL CORPORATION
                         (Incorporated in Pennsylvania)
                              500 College Road East
                           Princeton, New Jersey 08540



                                                       September 10, 1999

Cognizant Technology Solutions Corporation
500 Glenpointe Centre West
Teaneck, New Jersey  07666

Gentlemen:

     We have acted as counsel to Cognizant Technology Solutions  Corporation,  a
Delaware  corporation  (the  "Company"),  in  connection  with the filing by the
Company of a registration statement on Form S-8 (the "Registration  Statement"),
under the Securities Act of 1933, as amended, relating to the registration of an
aggregate of 1,400,000  shares (the  "Shares") of the  Company's  Class A Common
Stock,  $.01 par value, of which:  (i) 1,000,000  shares of Class A Common Stock
are  issuable  under  the  Company's  1999  Incentive   Compensation  Plan  (the
"Incentive  Plan"); and (ii) 400,000 shares of Class A Common Stock are issuable
under the  Company's  Employee  Stock  Purchase Plan (the  "Purchase  Plan" and,
together with the Incentive Plan, are hereinafter referred to as the "Plans").

     In  connection  with the  Registration  Statement,  we have  examined  such
corporate records and documents,  other documents,  and such questions of law as
we have deemed  necessary or  appropriate  for purposes of this opinion.  On the
basis of such examination, it is our opinion that:

     1.     The  issuance  of the  Shares in  accordance  with the  terms of the
            respective Plans has been duly and validly authorized; and

     2.     The Shares,  when issued,  delivered and sold in accordance with the
            terms  of the  respective  Plans  and the  stock  options,  or other
            instruments  authorized  by such  Plans,  granted  or to be  granted
            thereunder, will be validly issued, fully paid and non-assessable.

     We  hereby  consent  to the  filing  of this  opinion  as  Exhibit 5 to the
Registration Statement.

                                                Very truly yours,


                                            /s/ Buchanan Ingersoll
                                                Professional Corporation


