1
                                                                      EXHIBIT 11


                               COGNEX CORPORATION
                        COMPUTATION OF PER SHARE EARNINGS



   Weighted average common and common share equivalents were computed as follows
(a):



                                                                    DECEMBER 31,
                                                     1996              1995              1994
                                                     ----              ----              ----
                                                                                    
Weighted average common shares outstanding        40,594,050        38,175,461        34,559,556
Weighted average options outstanding ......        7,125,649         7,448,296         7,621,584
Shares assumed to be purchased ............       (3,905,842)       (3,672,012)       (5,031,566)
                                                  ----------        ----------        ----------
Primary weighted average common and common
   equivalent shares outstanding ..........       43,813,857        41,951,745        37,149,574
Dilutive effect of weighted average options                            656,725           774,920
                                                  ----------        ----------        ----------
Fully diluted weighted average common and
common equivalent shares outstanding ......       43,813,857        42,608,470        37,924,494
                                                  ==========        ==========        ==========


   (a) Adjusted for the two-for-one stock split effective December 18, 1995.