EX-5.1 5 a2175815zex-5_1.htm EX-5.1
QuickLinks -- Click here to rapidly navigate through this document


Exhibit 5.1

[LATHAM & WATKINS LLP LETTERHEAD]

February 6, 2007

Accuray Incorporated
1310 Chesapeake Terrace
Sunnyvale, CA 94089

Re: Initial Public Offering of Shares of Common Stock of Accuray Incorporated

Ladies and Gentlemen:

        We have acted as special counsel to Accuray Incorporated, a Delaware corporation (the "Company"), in connection with the proposed issuance of 7,333,333 shares (the "Shares") of common stock of the Company, par value $0.001 per share (the "Common Stock"). The Shares are included in a registration statement on Form S-1 under the Securities Act of 1933, as amended (the "Act"), filed with the Securities and Exchange Commission (the "Commission") on November 13, 2006 (File No. 333-138622), as amended (the "Registration Statement"). This opinion is being furnished in connection with the requirements of Item 601(b)(5) of Regulation S-K under the Act, and no opinion is expressed herein as to any matter pertaining to the contents of the Registration Statement or related prospectus (the "Prospectus"), other than as expressly stated herein with respect to the issue of the Shares.

        As such counsel, we have examined such matters of fact and questions of law as we have considered appropriate for purposes of this letter. With your consent, we have relied upon certificates and other assurances of officers of the Company and others as to factual matters without having independently verified such factual matters.

        We are opining herein only as to the Delaware General Corporation Law, and we express no opinion with respect to any other laws.

        Subject to the foregoing and the other matters set forth herein, it is our opinion that, as of the date hereof, when the Shares have been duly registered on the books of the transfer agent and registrar therefor in the name or on behalf of the purchasers, and have been delivered by the Company against payment therefor in the circumstances contemplated by the form of underwriting agreement filed as an exhibit to the Registration Statement, the issue and sale of the Shares will have been duly authorized by all necessary corporate action of the Company, and the Shares will be validly issued, fully paid and nonassessable.

        In rendering the foregoing opinion, we have assumed that the Company will comply with all applicable notice requirements regarding uncertificated shares provided in the Delaware General Corporation Law.

        Our opinions are subject to: (i) the effect of bankruptcy, insolvency, reorganization, fraudulent transfer, moratorium or other similar laws relating to or affecting the rights and remedies of creditors; and (ii) the effect of general principles of equity, whether considered in a proceeding in equity or at law (including the possible unavailability of specific performance or injunctive relief), concepts of materiality, reasonableness, good faith and fair dealing, and the discretion of the court before which a proceeding is brought.

        This opinion is for your benefit in connection with the Registration Statement and may be relied upon by you and by persons entitled to rely upon it pursuant to the applicable provisions of the Act. We consent to your filing this opinion as an exhibit to the Registration Statement and to the reference to our firm in the Prospectus under the heading "Legal Matters." In giving such consent, we do not



thereby admit that we are in the category of persons whose consent is required under Section 7 of the Act or the rules and regulations of the Commission thereunder.

  Very truly yours,

 

 
  /S/ LATHAM & WATKINS LLP



QuickLinks