Civil Litigation
Only if the contract or a statute provides for them. California generally leaves each side to pay its own lawyer (Code of Civil Procedure section 1021), but when a contract says attorney fees go to one party or to the prevailing party, Civil Code section 1717 lets whichever party prevails on the contract recover reasonable fees, even if the clause was written for the other side.
Last updated October 5, 2026.
Attorney fees can be the largest cost in a contract dispute, sometimes larger than the amount in dispute. Whether the winner can make the loser pay them often decides whether a case is worth bringing, defending or settling. This page explains California's rules on fee clauses, how courts decide who prevailed, how fees interact with settlement offers, and the deadline to ask for them. For a broader look at disputes we handle, see our civil litigation page.
| Situation | What the law says | Source |
|---|---|---|
| The clause names only one party, and the other party wins | The party prevailing on the contract recovers reasonable fees, whether or not named in the clause | Civ. Code 1717(a) |
| The clause covers only part of the contract | It is treated as covering the entire contract, unless each party had a lawyer in negotiating and signing it and the contract says so | Civ. Code 1717(a) |
| The contract waives fees | A waiver of fees under section 1717 in a contract is void | Civ. Code 1717(a) |
| The plaintiff voluntarily dismisses, or the case is dismissed under a settlement | There is no prevailing party for purposes of section 1717 | Civ. Code 1717(b)(2) |
| Mixed result | The court may find there is no party prevailing on the contract | Civ. Code 1717(b)(1) |
| Defendant tendered the full amount owed and deposited it in court | If the tender allegation is found true, the defendant is deemed the prevailing party | Civ. Code 1717(b) |
| No clause and no fee statute | Each side pays its own lawyer; the prevailing party still recovers costs | CCP 1021, 1032 |
| A 998 offer was rejected and not beaten | Postoffer costs shift, and fees count as costs when a contract, statute or law authorizes them | CCP 998, 1033.5(a)(10) |
Section 1717 applies "in any action on a contract." Many lawsuits mix contract claims with others, such as fraud or negligence. Section 1717(c) addresses that case: if the party who prevails on the contract owes damages on other claims, the fee award is offset against those damages. Whether a fee clause reaches the non-contract claims depends on its wording, because section 1021 leaves that to the parties' agreement. A clause covering any dispute "arising out of" the contract can reach further than one limited to enforcing it.
Section 1717(a) reads a fee clause as applying to the whole contract unless each party was represented by counsel in negotiating and signing it and the contract says so. If your contract does not contain that statement, the clause is read as covering the entire agreement. Our article on protecting your business with strong contracts covers drafting choices like this one.
A trial judgment usually makes the prevailing party easy to identify, but section 1717(b)(1) lets the court decide the question "whether or not the suit proceeds to final judgment." A voluntary dismissal or a dismissal under a settlement leaves no prevailing party for section 1717 (subdivision (b)(2)), although section 1032(a)(4) still treats a defendant in whose favor a dismissal is entered as the prevailing party for ordinary costs. If you settle, address fees expressly in the settlement agreement.
Section 1033.5(a)(10) makes attorney's fees authorized by contract, statute or law an item of costs, and section 1033.5(c)(5)(B) confirms that fees awarded under section 1717 are allowable costs. That brings fees into the cost-shifting rules of section 998. Our page on what happens if you turn down a 998 offer explains how a rejected offer can change who pays.
Section 1717 applies where the contract "specifically provides" for fees. If the deal was never written down, proving that the parties agreed to a fee clause is harder, and an oral agreement also has a shorter filing deadline under section 339. See whether a verbal business agreement is enforceable in California for the other issues oral deals raise.
If a plaintiff in a limited civil case recovers less than the small claims limit, section 1033(b) can limit costs, and in some cases allows fees only when otherwise allowed by law and the plaintiff gave written notice before suing. Under section 116.530, lawyers generally may not take part in a small claims case for a party, so compare small claims court and hiring a lawyer in Los Angeles County before deciding where to file.
For example, imagine a hypothetical small business in Glendale that leases a storefront on the landlord's form lease. The lease says that if the landlord has to sue to enforce it, the tenant will pay the landlord's attorney fees. When the business moves out, the landlord sues for $40,000 in claimed repair costs. The tenant defends, arguing the damage was there before the lease began.
Suppose the tenant wins at trial. Although the clause names only the landlord, section 1717(a) treats the tenant as the party prevailing on the contract, entitled to ask for reasonable fees as an element of costs. As an illustration of the timing only: if notice of entry of judgment is served on a given date in this unlimited civil case, rule 3.1702 and rule 8.104 give the tenant 60 days from that service to serve and file the fee motion, unless the parties stipulate to more time before it runs out or the judge extends it for good cause. The memorandum of ordinary costs is due much sooner, within 15 days under rule 3.1700.
Change one fact: if the landlord had dismissed the case voluntarily on the eve of trial, section 1717(b)(2) says there would be no prevailing party for contract fees, although the tenant could still claim ordinary costs under section 1032. The example shows how the rules apply, not how any court would rule on these facts.
Generally not, unless a statute provides for them. Section 1021 leaves attorney compensation to the parties' agreement except where a statute specifically provides for fees, though the prevailing party still recovers allowable costs under section 1032.
Under section 1717(a), reasonable fees are fixed by the court and are "an element of the costs of suit." Section 1033.5(a)(10) also lists fees authorized by contract, statute or law as allowable costs.
Not under section 1717 if the case was voluntarily dismissed or dismissed under a settlement, because subdivision (b)(2) says there is then no prevailing party. You may still recover ordinary costs, since section 1032 treats a defendant in whose favor a dismissal is entered as a prevailing party.
Yes, in two ways. Under rule 3.1702(b)(2), the parties may stipulate before the deadline passes to extend it, up to 60 days after the appeal deadline in an unlimited case or 30 days in a limited case, and under rule 3.1702(d) the judge may extend it for good cause.
If the agreement has a fee clause and the dispute is an action on that agreement, section 1717 can apply. Our page on what happens when a business partner wants out covers the other questions a co-owner dispute raises.
Employment claims are covered on a separate page. See who pays the lawyer in a California employment case for the rules that apply to workers.
We review fee clauses before a dispute starts, advise on how they change settlement value, and bring and oppose fee motions after judgment for individuals and businesses in Glendale and Los Angeles County. Call (818) 244-9000 or request a consultation, and bring the contract.
Our Glendale team can review the contract, explain how the fee clause may cut both ways, and help you plan around it.
Request a Consultation