EXHIBIT 5
                     
                             
                                   
  
                              June 23, 1997
  
  
  
  BGS Systems, Inc.
  One First Avenue
  Waltham, MA  02254-9111
  
  Gentlemen:
  
   On your behalf, I have prepared a Registration Statement on Form S-8
  (the  Registration Statement ) for filing with the Securities and
  Exchange Commission relating to shares of the common stock, $.10 par
  value per share ( Common Stock ), of BGS Systems, Inc., a Massachusetts
  corporation (the  Company ), issuable under the Company s 1997 Employee
  Stock Purchase Plan (the  Plan ).
  
  I have examined the Articles of Organization of the Company and all
  amendments thereto in the office of the Secretary of State of
  Massachusetts, all pertinent records of the meetings of the directors
  and stockholders of the Company, the Registration Statement and such
  other documents relating to the Company as I have deemed material for
  the purposes of this opinion.
  
  Based upon the foregoing, it is my opinion that the Company has duly
  authorized for issuance the shares of Common Stock covered by the
  Registration Statement to be issued under the Plan, as described in the
  Registration Statement, and such shares, when issued in accordance with
  the terms of the Plan, will be legally issued, fully paid and non-
  assessable.
  
  I hereby consent to the use of my name in the Registration Statement
  and the filing of this opinion with the Securities and Exchange
  Commission in connection with the Registration Statement.
  
                              Sincerely,
  
                              /S/ C. RUSSEL HANSEN, JR.
                              ----------------------------------
                              Vice President and General Counsel