1
                                                                    EXHIBIT 5.01



                                 June 17, 1999


HNC Software Inc.
5935 Cornerstone Court West
San Diego, CA 92121-3728

Gentlemen/Ladies:

        At your request, we have examined the Registration Statement on Form S-8
(the "Registration Statement") filed by you with the Securities and Exchange
Commission (the "Commission") on or about June 17, 1999 in connection with the
registration under the Securities Act of 1933, as amended, of: (i) an aggregate
of 2,000,000 additional shares of the Common Stock, $0.001 par value (the
"Common Stock"), of HNC Software Inc., a Delaware corporation (the "Company"),
reserved for issuance by the Company under its 1995 Equity Incentive Plan (the
"Equity Plan"); (ii) an aggregate of 250,000 additional shares of the Company's
Common Stock, reserved for issuance by the Company upon exercise of purchase
rights granted or to be granted under its 1995 Employee Stock Purchase Plan (the
"Employee Plan"); and (iii) an aggregate of 200,000 additional shares of the
Company's Common Stock, reserved for issuance by the Company under its 1995
Directors Stock Option Plan (the "Directors Plan") (all such foregoing 2,450,000
shares of the Company's Common Stock being hereinafter referred to as the
"Stock").

        In rendering this opinion, we have examined the following:

        (1)  your registration statement on Form S-1 (File Number 33-91932)
             filed with and declared effective by the Commission on June 20,
             1995, together with the Exhibits filed as a part thereof;

        (2)  your registration statement on Form 8-A filed with the Commission
             on May 26, 1995, together with the order of effectiveness issued by
             the Commission therefor on June 20, 1995;

        (3)  your Registration Statements on Form S-8 (File Nos. 33-92902,
             333-14323, 333-18871, 333-42819, 333-46875, 333-50623, 333-62195
             and 333-71923) filed with the Commission.

        (4)  the Registration Statement, together with the Exhibits filed as a
             part thereof;

        (5)  the Prospectuses prepared in connection with the Registration
             Statement;

        (6)  the Nasdaq National Market Listing of Additional Shares
             Notifications prepared in connection with the Registration
             Statement;

        (7)  the Equity Plan and related award grant and exercise agreement
             forms;

        (8)  the Employee Plan and related subscription agreement form;

        (9)  the Directors Plan and related award grant and exercise agreement
             forms;




   2

        (10) the Restated Certificate of Incorporation of the Company filed with
             the Delaware Secretary of State on June 13, 1996 and the Bylaws of
             the Company, both as filed by the Company with its Report on Form
             10-Q for the quarter ended June 30, 1996;

        (11) the minutes of meetings and actions by written consent of the
             stockholders and Board of Directors of the Company that are
             contained in your minute books that are in our possession;

        (12) A certificate from your transfer agent Boston Equiserve dated of
             even date herewith, verifying the number of your issued and
             outstanding shares of capital stock as of June 16, 1999, a
             list of outstanding options to purchase shares of the Company's
             capital stock that was prepared by you and dated as of June 16,
             1999 verifying the number of such issued and outstanding
             securities and oral confirmation from both Boston Equiserve and
             the Company that such certificate and such list are true and
             correct as of June 17, 1999; and

        (13) a Management Certificate addressed to us and dated of even date
             herewith executed by the Company containing certain factual and
             other representations.

        In our examination of documents for purposes of this opinion, we have
assumed, and express no opinion as to, the genuineness of all signatures on
original documents, the authenticity and the completeness of all documents
submitted to us as originals, the conformity to originals and completeness of
all documents submitted to us as copies, the legal capacity of all natural
persons executing the same, the lack of any undisclosed termination,
modification, waiver or amendment to any document reviewed by us and the due
authorization, execution and delivery of all documents where due authorization,
execution and delivery are prerequisites to the effectiveness thereof.

        As to matters of fact relevant to this opinion, we have relied solely
upon our examination of the documents referred to above and have assumed the
current accuracy and completeness of the information obtained from public
officials and records referred to above. We have made no independent
investigation or other attempt to verify the accuracy of any of such information
or to determine the existence or non-existence of any other factual matters;
however, we are not aware of any facts that would cause us to believe that the
opinion expressed herein is not accurate.

        We are admitted to practice law in the State of California, and we
express no opinion herein with respect to the application or effect of the laws
of any jurisdiction other than the existing laws of the United States of America
and the State of California and (without reference to any case law or secondary
sources) the existing Delaware General Corporation Law.

        In connection with our opinion expressed below, we have assumed that, at
or prior to the time of the delivery of any shares of Stock, the Registration
Statement will have been declared effective under the Securities Act of 1933, as
amended, that the registration will apply to such shares of Stock and will not
have been modified or rescinded or been made subject to any Commission stop
order and that there will not have occurred any change in law affecting the
validity or enforceability of such shares of Stock.

        Our opinions in paragraphs (i) through (iii) below are given on the
respective assumptions that: (x) the 2,000,000 shares of Common Stock of the
Company referred to in paragraph (i) may not be issued and sold by the Company
in accordance with the Equity Plan unless and until such shares, at the time in
question, are explicitly reserved and available for issuance under the Equity
Plan or become issuable under the Equity Plan in the future by virtue of the
terms of Section 2.1 of the Equity Plan, which provide that certain shares
issuable upon exercise of stock options




   3

granted under the "Prior Plan" (as such term is defined in the Equity Plan) that
expire or become unexercisable without having been exercised are available for
grant and issuance under the Equity Plan; (y) the 250,000 shares of Common Stock
of the Company referred to in paragraph (ii) may not be issued and sold by the
Company in accordance with the Employee Plan unless and until such shares, at
the time in question, are explicitly reserved and available for issuance under
the Employee Plan; and (z) the 200,000 shares of Common Stock of the Company
referred to in paragraph (iii) may not be issued and sold by the Company in
accordance with the Directors Plan unless and until such shares, at the time in
question, are explicitly reserved and available for issuance under the Directors
Plan.

        Based upon the foregoing, it is our opinion that:

        (i)    the 2,000,000 additional shares of Common Stock that may be
               issued and sold by you upon the exercise of stock options, the
               purchase of restricted stock or awards of stock bonuses awarded
               or to be awarded under the Equity Plan, when issued and sold in
               accordance with the Equity Plan and the stock option, restricted
               stock purchase agreement or stock bonus agreements to be entered
               into thereunder, and in the manner referred to in the relevant
               Prospectus associated with the Equity Plan and the Registration
               Statement, will be validly issued, fully paid and nonassessable;

        (ii)   the 250,000 additional shares of Common Stock that may be issued
               and sold by you upon the exercise of purchase rights granted or
               to be granted under the Employee Plan, when issued and sold in
               accordance with the Employee Plan and the subscription agreements
               to be entered into thereunder, and in the manner referred to in
               the relevant Prospectus associated with the Employee Plan and the
               Registration Statement, will be validly issued, fully paid and
               nonassessable; and

        (iii)  the 200,000 additional shares of Common Stock that may be issued
               and sold by you upon the exercise of stock options awarded or to
               be awarded under the Directors Plan, when issued and sold in
               accordance with the Directors Plan and the stock option
               agreements to be entered into thereunder, and in the manner
               referred to in the relevant Prospectus associated with the
               Directors Plan and the Registration Statement, will be validly
               issued, fully paid and nonassessable.

        We consent to the use of this opinion as an exhibit to the Registration
Statement and further consent to all references to us, if any, in the
Registration Statement, the Prospectus constituting a part thereof and any
amendments thereto.

        This opinion speaks only as of its date and we assume no obligation to
update this opinion should circumstances change after the date hereof. This
opinion is intended solely for your use as an exhibit to the Registration
Statement for the purpose of the above sale of the Stock and is not to be relied
upon for any other purpose.

                                        Very truly yours,


                                        FENWICK & WEST LLP