Summary of Significant Accounting Policies | 2. Summary of Significant Accounting Policies Basis of Presentation The consolidated financial statements have been prepared in conformity with accounting principles generally accepted in the United States, or GAAP, and pursuant to the rules and regulation of the Securities and Exchanges Commission, or SEC. The consolidated financial statements include the accounts of ViewRay, Inc. and its wholly-owned subsidiary, ViewRay Technologies, Inc. All inter-company accounts and transactions have been eliminated in consolidation. Use of Estimates The preparation of the consolidated financial statements in conformity with GAAP requires management to make estimates and assumptions that affect the amounts reported and disclosed in the consolidated financial statements and accompanying notes. Such estimates include, but are not limited to, allocation of revenue to its multiple deliverable elements, inventory write-downs to reflect net realizable value, assumptions used in the valuation of stock-based awards and warrant liability, and valuation allowances against deferred tax assets. Actual results could differ from those estimates. Cash and Cash Equivalents The Company considers all highly liquid investments purchased with an original maturity of three months or less to be cash equivalents. The Company deposits its cash primarily in checking and money market accounts. Restricted Cash At December 31, 2017 and 2016, the Company had an aggregate of $0.9 million of outstanding letters of credit related to its operating leases and its contractual obligations with distributors and customers. The letters of credit are collateralized by a restricted cash deposit account, which is presented as part of noncurrent assets on the balance sheets because the Company is not certain when the restriction will be lifted on the collateralized letters of credit. At December 31, 2017, and 2016, no amounts were drawn on the letters of credit. The restricted cash balance as of December 31, 2017 also includes $0.2 million collateral for a credit card account. Concentration of Credit Risk, Other Risks and Uncertainties Financial instruments that potentially subject the Company to concentrations of credit risk consist primarily of cash and cash equivalents and accounts receivable. Cash and cash equivalents are deposited in checking and money market accounts with various financial institutions. At times, cash balances may be in excess of the amounts insured by the Federal Deposit Insurance Corporation. Management believes the financial risk associated with these balances is minimal and has not experienced any losses to date. The Company performs periodic credit evaluations of its customers’ financial condition and generally requires deposits from its customers. The Company’s accounts receivable was derived from billings to customers. The Company’s customers representing greater than 10% of accounts receivable and revenue for the periods presented were as follows: Revenue Accounts Receivables Year Ended December 31, December 31, Customers 2017 2016 2015 2017 2016 Customer A 17% Customer B 17% Customer C 16% 48% Customer D 16% 24% Customer E 14% 16% Customer F 10% Customer G 36% Customer H 47% 49% Customer I 25% Customer J 23% 41% Customer K 43% The Company’s future results of operations involve a number of risks and uncertainties. Factors that could affect the Company’s future operating results and cause actual results to vary materially from expectations include, but are not limited to, rapid technological change, continued acceptance of MRIdian, competition from substitute products and larger companies, protection of proprietary technology, ability to maintain distributor relationships and dependence on key individuals. Furthermore, new products to be developed by the Company require approval from the FDA or other international regulatory agencies prior to commercial sales. There can be no assurance that the Company’s future products will receive the necessary clearances. The Company relies on a concentrated number of suppliers to manufacture essentially all of the components used in MRIdian. The Company’s suppliers may encounter problems during manufacturing due to a variety of reasons, including failure to comply with applicable regulations, including the FDA’s Quality System Regulation, equipment malfunction and environmental factors, any of which could delay or impede our ability to meet demand. Accounts Receivables and Allowance for Doubtful Accounts Accounts receivable are recorded at the invoiced amount, net of any allowance for doubtful accounts, and do not bear interest. The allowance for doubtful accounts, if any, is based on the assessment of the collectability of customer accounts. Based on the specific customers and the current economic conditions, there was no allowance for doubtful accounts recorded at December 31, 2017 and 2016. Fair Value of Financial Instruments Financial instruments consist of cash and cash equivalents, accounts receivable, restricted cash, prepaid expenses and other current assets, accounts payable, accrued liabilities, warrant liability and long-term debt. Cash equivalents are stated at amortized cost, which approximates fair value at the balance sheet dates, due to the short period of time to maturity. Accounts receivable, prepaid expenses and other current assets, accounts payable and accrued liabilities are stated at their carrying value, which approximates fair value due to the short time to the expected receipt or payment date. The warrant liability is carried at fair value. The carrying amount of the Company’s long-term debt approximates fair value as the stated interest rate approximates market rates currently available to the Company. Inventory and Deposits on Purchased Inventory Inventory consists of purchased components for assembling MRIdian systems and other direct and indirect costs associated with MRIdian system installation. Inventory is stated at the lower of cost (on a weighted average cost basis) or market value. All inventories expected to be placed in service during the normal operating cycle of the Company for the delivery and assembly of MRIdian systems, including items expected to be on hand for more than one year, are classified as current assets. The Company reduces the carrying value of its inventory for the difference between cost and net realizable value and records a charge to cost of product revenues for the amount required to reduce the carrying value of inventory to net realizable value. The Company recorded an inventory lower of cost and market adjustment of $0.9 million, $1.9 million and $2.6 million during the years ended December 31, 2017, 2016 and 2015, respectively. The Company records inventory items which have been paid for but not yet received and title has not yet transferred to the Company as deposits on purchased inventory. Deposits on purchased inventory are included within current assets as the related inventory items are expected to be received and used in MRIdian systems within the Company’s normal operating cycle. The Company assesses the recoverability of deposits on purchased inventory based on credit assessments of the vendors and their history supplying these assets. At December 31, 2017, the Company did not have any instances whereby deposits for purchased inventory were written off or the purchased inventory was not delivered. Shipping and Handling Costs Shipping and handling costs for product shipments to customers are included in cost of product revenue. Shipping and handling costs incurred for inventory purchases are capitalized in inventory and expensed in cost of product revenue. These costs are not passed on to customers. Property and Equipment Property and equipment are recorded at cost. Depreciation is computed over estimated useful lives, ranging from two to 15 years, of the related assets using the straight-line method. Acquired software is recorded at cost. Amortization of acquired software generally occurs over three years using the straight-line method. Leasehold improvements are amortized on a straight-line basis over the shorter of the useful life or term of the lease. Demonstration units, which are the Company products used for demonstration purpose for customers and/or potential customers, and generally not intended to be sold, are amortized by the straight-line method. Upon retirement or sale, the cost and related accumulated depreciation are removed from the balance sheet and the resulting gain or loss is recorded to general and administrative expense in the accompanying statements of operations and comprehensive loss. Routine expenditures for maintenance and repairs are expensed as incurred. Depreciation and amortization periods for property and equipment are as follows: Property and Equipment Estimated Useful Life Prototype 2 – 10 years Machinery and equipment 5 – 15 years Furniture and fixture 5 – 10 years Software 3 years Leasehold improvements Lesser of estimated useful life or remaining lease term Asset Retirement Obligation In connection with certain lease agreements entered into in October 2015, the Company has a legal requirement to remove long-lived assets constructed on leased property and to restore the leased property to its original condition. The Company records the fair value of the liability for a legal obligation to retire an asset in the period in which the obligation is incurred if a reasonable estimate of fair value can be made. The Company measures the fair value of the asset retirement obligation based upon the present value of the expected future payments, and recognized asset retirement obligation of $250,000 at inception. The liability is accreted to its present value each period and the capitalized cost is depreciated over the remaining lease term. Accretion expense is calculated by applying the effective interest rate to the carrying amount of the liability at the beginning of each period. The effective interest rate is the credit-adjusted risk-free rate applied when the liability was initially measured and recognized. At December 31, 2017, the Company had outstanding asset retirement obligations of $334,000, which was included in other long-term liabilities in the accompanying consolidated balance sheets. For the years ended December 31, 2017, 2016 and 2015, the Company recognized accretion expenses of $40,000, $36,000 and $8,000 in the accompanying statements of operations and comprehensive loss. Intangible Assets Intangible assets consist primarily of patents and license acquisition costs associated with certain technology components incorporated into the Company’s MRIdian systems. The Company capitalizes the cost and amortizes it on a straight-line basis over the estimated useful lives, which is generally three years for license cost and five to seven years for patents. Impairment of Long-Lived Assets The Company reviews the recoverability of long-lived assets, including equipment, leasehold improvements, software and intangible assets when events or changes in circumstances occur that indicate that the carrying value of the asset may not be recoverable. The assessment of possible impairment is based on the ability to recover the carrying value of the assets from the expected future cash flows (undiscounted and without interest charge) of the related operations. If these cash flows are less than the carrying value of such assets, an impairment loss for the difference between the estimated fair value and carrying value is recorded. There was no impairment loss recognized during the years ended December 31, 2017, 2016 and 2015. Deferred Offering Costs ViewRay Technologies, Inc. capitalized qualified legal, accounting and other direct costs related to its efforts to raise capital through a public sale of its common stock in its planned IPO. These costs were recorded in deferred offering costs in the accompanying balance sheets Comprehensive Loss Comprehensive loss is the change in equity of a company during a period from transactions and other events and circumstances, excluding transactions resulting from investment owners and distribution to owners. For the periods presented, comprehensive loss did not differ from net loss. Revenue Recognition The Company derives revenue primarily from the sale of the systems and related services, which are sales of MRIdian, as well as support and maintenance services on sold systems. In all sales arrangements, the Company recognizes revenues when there is persuasive evidence of an arrangement, the fee is fixed or determinable, collection of the fee is reasonably assured and delivery has occurred. For sales of MRIdian systems that the Company is required to install at the customer site, product revenue is recognized upon receipt of customer acceptance. For sales of MRIdian systems that the Company is not responsible for installation, product revenue is recognized when the entire system is delivered and title and risk of loss are transferred to the customer. For sales of the related support and maintenance services, the Company recognizes service revenue on a straight-line basis over the service contract term, which is typically 12 months. Multiple Elements Based on the nature of the Company’s business, it frequently enters into sales arrangements with customers that contain multiple elements or deliverables. The principal deliverables consist of (i) sale of MRIdian systems, which generally includes installation, site preparation and software, and (ii) product support, which includes extended service and maintenance. The Company determines selling prices of each deliverable using vendor specific objective evidence, or VSOE, if it exists, or third-party evidence, or TPE. If neither VSOE nor TPE exists for a deliverable, the Company uses best estimated selling price, or BESP. The Company allocates revenue to each standalone deliverable using the relative fair values for each deliverable as determined by BESP. The Company regularly reviews VSOE, TPE and BESP for all of its MRIdian systems and services. Product Revenue Product revenue is derived primarily from the sales of MRIdian. The system contains both software and non-software components that together deliver essential functionality. However, because MRIdian includes hardware products as well as software components that function together with the hardware components to deliver MRIdian’s essential functionality, the revenue from the sale of MRIdian systems does not fall within the scope of the software revenue recognition rules. The Company’s customer contracts generally call for on-site assembly of the system components and system integration. Once the system installation is completed, the Company performs a detailed demonstration with the customer showing that MRIdian meets the standard product specifications. After successful demonstration, the customer signs a document indicating customer’s acceptance. For sales of MRIdian systems that the Company is required to install at the customer site, revenue recognition occurs when the customer acknowledges that the system operates in accordance with standard product specifications, the customer accepts the installed unit and title and risk of loss are transferred to the customer. Certain customer contracts with distributors do not require installation at the customer site, and the distributors typically have its own or engage a qualifying third-party certified technician to perform the installation. For sales of MRIdian systems when the Company is not responsible for installation, revenue recognition occurs when the entire system is delivered and title and risk of loss are transferred to the customer. All contracts include customer deposits upon signing of the agreement with final payment generally due upon customer acceptance. Service Revenue Service revenue is derived primarily from maintenance services. Service revenue is recognized ratably over the service period. Distribution Rights Revenue The Company entered into a distribution agreement with Itochu Corporation pursuant to which it appointed Itochu as its exclusive distributor for the promotion, sale and delivery of MRIdian products within Japan. In consideration of the exclusive distribution rights granted, the Company received $4.0 million which was recorded as deferred revenue and starting in August 2016 was recognized as distribution rights revenue on a straight-line basis over the remaining term of the distribution agreement of approximately 8.5 years . Customer Deposits Customer deposits represent payments received in advance of system installation. For domestic sales, advance payments received prior to inventory shipments and customer acceptance are recorded as customer deposits. For international sales, advance payments are initially recorded as customer deposits and are subsequently reclassified to deferred revenue upon inventory shipment when the title and risk of loss of inventory items transfer to customers. All customer deposits, including those that are expected to be a deposit for more than one year, are classified as current liabilities based on consideration of the Company’s normal operating cycle (the time between acquisition of the inventory components and the final cash collection from customers on these inventory components) which is in excess of one year. Deferred Revenue and Deferred Cost of Revenue Deferred revenue consists of deferred product revenue and deferred service revenue. Deferred product revenue arises from timing differences between the fulfillment of other contract deliverables and satisfaction of all revenue recognition criteria consistent with the Company’s revenue recognition policy. Deferred service revenue results from the advance billing for services to be delivered over a period of time. Deferred revenues expected to be realized within one year are classified as current liabilities. Deferred cost of revenue consists of cost for inventory items that have been shipped with title and risk of loss transferred to the customer but the customer acceptance has not been received. Deferred cost of revenue is included as part of current assets as the corresponding deferred product revenue is expected to be realized within one year. The inventories recorded in deferred cost of revenue are also included in the inventory lower of cost or market analysis. At December 31, 2017 and 2016, no reserve was required for deferred cost of revenue. Research and Development Costs Expenditures, including payroll, contractor expenses and supplies, for research and development of products and manufacturing processes are expensed as incurred. Software development costs incurred subsequent to establishing technological feasibility are capitalized through the general release of MRIdian systems that contain the embedded software elements. Technological feasibility is demonstrated by the completion of a working model. The Company has not capitalized any software development costs at December 31, 2017 or 2016, since the costs incurred subsequent to achieving technological feasibility and completing the research and development for the software components were immaterial. Stock-Based Compensation The Company uses the Black-Scholes option-pricing model as the method for estimating the fair value of stock options. The Black-Scholes option-pricing model requires the use of highly subjective and complex assumptions that determine the fair value of share-based awards, including the options’ expected term and the price volatility of the underlying stock Medical Device Excise Tax Medical Device Excise Tax, or MDET, Section 4191 of the Internal Revenue Code enacted by the Health Care and Education Reconciliation Act of 2010, in conjunction with the Patient Protection and Affordable Care Act, established a 2.3% excise tax on medical devices sold domestically which, due to subsequent legislative amendments, was suspended from January 1, 2016 to December 31, 2017. MDET was suspended for another two years after the stopgap bill was signed by the President in January 2018 The Company included MDET in cost of product revenue during the year ended December 31, 2015, net of amounts directly billed to the customer for this tax, if any. Deferred Commissions Deferred commissions are the direct and incremental costs directly associated with the MRIdian system contracts with customers, which primarily consist of sales commissions to our direct sales force. The commissions are deferred and expensed in proportion to the revenue recognized upon the acceptance of the MRIdian system. At December 31, 2017 and 2016, the Company had $3.5 million and $2.6 million deferred commissions recorded as part of prepaid expenses and other current assets on the accompanying consolidated balance sheets. Income Taxes The Company uses the asset and liability method of accounting for income taxes. Deferred tax assets and liabilities are recognized for the estimated future tax consequences attributable to differences between the financial statement carrying amounts of existing assets and liabilities and their respective tax bases. Deferred tax assets and liabilities are measured using enacted tax rates expected to apply to taxable income in the years in which those temporary differences are expected to be recovered or settled. Deferred tax expense or benefit is the result of changes in the deferred tax assets and liabilities. Valuation allowances are established when necessary to reduce deferred tax assets where, based upon the available evidence, management concludes that it is more-likely-than not that the deferred tax assets will not be realized. Because of the uncertainty of the realization of the deferred tax assets, the Company has recorded a full valuation allowance against its net deferred tax assets. In evaluating the ability to recover its deferred income tax assets, the Company considers all available positive and negative evidence, including its operating results, ongoing tax planning and forecasts of future taxable income on a jurisdiction-by-jurisdiction basis. In the event the Company was to determine that it would be able to realize its deferred income tax assets in the future in excess of their net recorded amount, it would make an adjustment to the valuation allowance which would reduce the provision for income taxes. Reserves are provided for tax benefits for which realization is uncertain. Such benefits are only recognized when the underlying tax position is considered more likely than not to be sustained on examination by a taxing authority, assuming they possess full knowledge of the position and facts. It is the Company’s policy to include any penalties and interest related to income taxes in its income tax provision; however, the Company currently has no penalties or interest related to income taxes. The earliest year that the Company is subject to examination is the year ended December 31, 2004. Warrant Liability Convertible Preferred Stock Warrant Liability The Company’s warrant to purchase convertible preferred stock was classified as a liability on the consolidated balance sheets at fair value upon issuance because the warrant is exercisable for contingently redeemable preferred stock which is classified outside of stockholders’ equity (deficit). The warrant was subject to re-measurement to fair value at each balance sheet date, and any change in fair value was recognized in the consolidated statements of operations and comprehensive loss as other expense, net. In July 2015, upon the Merger of the Company and ViewRay Technologies, Inc., and the Private Placement, the convertible preferred stock warrants were converted into warrants to purchase the Company’s common stock, and the fair value of the preferred stock warrant liability was reclassified to additional paid-in capital. Common Stock Warrant Liability Certain warrants to purchase common stock provide for cash settlement in the event of change in control, and are classified as liabilities on the balance sheets at fair value upon issuance (see Note 14). These warrants are subject to re-measurement to fair value at each balance sheet date, and any change in fair value are recognized in the consolidated statements of operations and comprehensive loss as other expense, net. Upon exercise or expiration of the warrants, the related warrant liability will be reclassified to additional paid-in capital. Net Loss per Share The Company’s basic net loss per share is calculated by dividing the net loss by the weighted-average number of shares of common stock outstanding for the period. Contingently issuable shares are included in the computation of basic net loss per share as of the date that all necessary conditions have been satisfied and issuance of the shares is no longer contingent. The diluted net loss per share is computed by giving effect to all potential common stock equivalents outstanding for the period determined using the treasury stock method. For purposes of this calculation, stock options, restricted stock units and warrants to purchase common stock are considered to be common stock equivalents but have been excluded from the calculation of diluted net loss per share as their effect is anti-dilutive. Recent Accounting Pronouncements In May 2014, the Financial Accounting Standards Board (“FASB”) issued ASU No. 2014-09, Revenue from Contracts with Customers (Topic 606) The Company will adopt Topic 606 on January 1, 2018 using the full retrospective method which requires the Company to restate each prior reporting period presented. Based on the nature of its sales arrangements, the Company does not believe the adoption of the new standards will have a material impact on the amount or timing of its revenue recognition, and the Company’s product revenue, service revenue and distribution rights revenue will remain substantially unchanged. As a result, the adoption of the new standards will have no material impact on the Company’s prior period financial statements. The Company expects to update the related disclosures upon adoption of the new standards in In February 2016, the FASB issued ASU No. 2016-02, Leases (Topic 842) As disclosed in Note 7, future minimum payments under noncancelable operating leases are approximately $2.2 million. In August 2016, the FASB issued ASU No. 2016-15, Statement of Cash Flows (Topic 230): Classification of Certain Cash Receipts and Cash Payments, Statement of Cash Flows (Topic 230): Restricted Cash, In May 2017, the FASB issued ASU No. 2017-09, Compensation-Stock Compensation (Topic 718): Scope of Modification Accounting Recently Adopted Accounting Pronouncements In July 2015, the FASB issued ASU No. 2015-11, Simplifying the Measurement of Inventory In March 2016, the FASB issued ASU No. 2016-09, Compensation – Stock Compensation (Topic 718 ): Improvements to Employee Share-Based Payment Accounting |