California Code of Civil Procedure 998
(a) The costs allowed under Sections 1031 and 1032 shall be withheld or augmented as provided in this section.
(b) Not less than 10 days prior to commencement of trial or arbitration (as provided in Section 1281 or 1295) of a dispute to be resolved by arbitration, any party may serve an offer in writing upon any other party to the action to allow judgment to be taken or an award to be entered in accordance with the terms and conditions stated at that time. The written offer shall include a statement of the offer, containing the terms and conditions of the judgment or award, and a provision that allows the accepting party to indicate acceptance of the offer by signing a statement that the offer is accepted. Any acceptance of the offer, whether made on the document containing the offer or on a separate document of acceptance, shall be in writing and shall be signed by counsel for the accepting party or, if not represented by counsel, by the accepting party.
(1) If the offer is accepted, the offer with proof of acceptance shall be filed and the clerk or the judge shall enter judgment accordingly. In the case of an arbitration, the offer with proof of acceptance shall be filed with the arbitrator or arbitrators who shall promptly render an award accordingly.
(2) If the offer is not accepted prior to trial or arbitration or within 30 days after it is made, whichever occurs first, it shall be deemed withdrawn, and cannot be given in evidence upon the trial or arbitration.
(3) For purposes of this subdivision, a trial or arbitration shall be deemed to be actually commenced at the beginning of the opening statement of the plaintiff or counsel, and if there is no opening statement, then at the time of the administering of the oath or affirmation to the first witness, or the introduction of any evidence.
(1) If an offer made by a defendant is not accepted and the plaintiff fails to obtain a more favorable judgment or award, the plaintiff shall not recover his or her postoffer costs and shall pay the defendant’s costs from the time of the offer. In addition, in any action or proceeding other than an eminent domain action, the court or arbitrator, in its discretion, may require the plaintiff to pay a reasonable sum to cover costs of the services of expert witnesses, who are not regular employees of any party, actually incurred and reasonably necessary in either, or both, preparation for trial or arbitration, or during trial or arbitration, of the case by the defendant.
(A) In determining whether the plaintiff obtains a more favorable judgment, the court or arbitrator shall exclude the postoffer costs.
(B) It is the intent of the Legislature in enacting subparagraph (A) to supersede the holding in Encinitas Plaza Real v. Knight, 209 Cal.App.3d 996, that attorney’s fees awarded to the prevailing party were not costs for purposes of this section but were part of the judgment.
(d) If an offer made by a plaintiff is not accepted and the defendant fails to obtain a more favorable judgment or award in any action or proceeding other than an eminent domain action, the court or arbitrator, in its discretion, may require the defendant to pay a reasonable sum to cover postoffer costs of the services of expert witnesses, who are not regular employees of any party, actually incurred and reasonably necessary in either, or both, preparation for trial or arbitration, or during trial or arbitration, of the case by the plaintiff, in addition to plaintiff’s costs.
(e) If an offer made by a defendant is not accepted and the plaintiff fails to obtain a more favorable judgment or award, the costs under this section, from the time of the offer, shall be deducted from any damages awarded in favor of the plaintiff. If the costs awarded under this section exceed the amount of the damages awarded to the plaintiff the net amount shall be awarded to the defendant and judgment or award shall be entered accordingly.
(f) Police officers shall be deemed to be expert witnesses for the purposes of this section. For purposes of this section, “plaintiff” includes a cross-complainant and “defendant” includes a cross-defendant. Any judgment or award entered pursuant to this section shall be deemed to be a compromise settlement.
(g) This chapter does not apply to either of the following:
(1) An offer that is made by a plaintiff in an eminent domain action.
(2) Any enforcement action brought in the name of the people of the State of California by the Attorney General, a district attorney, or a city attorney, acting as a public prosecutor.
(h) The costs for services of expert witnesses for trial under subdivisions (c) and (d) shall not exceed those specified in Section 68092.5 of the Government Code.
(i) This section shall not apply to labor arbitrations filed pursuant to memoranda of understanding under the Ralph C. Dills Act (Chapter 10.3 (commencing with Section 3512) of Division 4 of Title 1 of the Government Code).
Source: CCP 998