Fences, neighbors and Civil Code 841

Who pays for a shared fence, and how tall it can be in San Francisco

California presumes neighbors benefit equally from the fence between their lots and split its reasonable cost equally, unless they agreed otherwise in writing (Civil Code 841). Before spending, give the neighbor 30 days' written notice describing the problem, the fix, the estimated cost, the proposed split and the timeline. In San Francisco, a fence up to 3 feet in front or 6 feet at the side or rear needs no building permit.

  • Updated
  • 14 min read
  • Checked against 13 public sources

The short version

  • Civil Code 841 presumes adjoining owners share the reasonable cost of building, maintaining or replacing the fence between them equally, unless a written agreement says otherwise.
  • The 30-day written notice must name the presumption, the problem, the fix, the estimated cost, the proposed split and the timeline.
  • A neighbor can overturn the even split by showing it would be unjust, for example when the extra cost comes from your taste.
  • San Francisco Planning allows fences up to 10 feet in required rear and side yards; in a front setback, 3 feet solid or 6 feet if 75% open.
  • This is general information, not legal advice. For a real dispute, try mediation first and talk to a California lawyer.

The boards along the back of the lot have leaned toward the neighbor's yard since last winter, and one post now rocks when you push it. Before anyone digs, two sets of rules decide how this goes: a state law about who pays for a fence between two lots, and San Francisco's rules on how tall it may be.

What Civil Code 841 says, in plain English

California rewrote its fence statute in 2013, and the current Civil Code 841 took effect on January 1, 2014. It opens with a general rule: adjoining owners share equally in maintaining the boundaries and boundary markers between them. Then it gets specific. Owners on each side of a fence that divides their properties are presumed to benefit equally from it and, unless they agreed otherwise in writing, to be equally responsible for the reasonable costs of building, maintaining or necessarily replacing it.

Two words do most of the work. Presumed means the even split is where a court starts, not where it must end: a neighbor who proves by a preponderance of the evidence that an equal share would be unjust can be ordered to pay less, or nothing. Reasonable matters because the statute tells a court to weigh costs that look unnecessary or excessive, or that come from one owner's own taste.

What the even split covers

  • A fence dividing two privately held properties
  • Building, maintaining, or a necessary replacement
  • Reasonable costs, not every upgrade one side wants
  • Any private owner holding a possessory interest in the land

What can change it

  • A written agreement between the neighbors that says otherwise
  • A burden far out of proportion to that owner's benefit
  • A fence costing more than it adds to the property's value
  • Undue financial hardship, shown with reasonable proof
  • Costs that look unnecessary or excessive, or come from one owner's aesthetic preferences
  • A neighbor that is a public agency, not a landowner under the statute

HUD's inspection guide adds a practical point: fences often turn up in homeowner association bylaws and deed covenants. In an HOA or a planned development, read those papers before relying on the presumption; whether they count as the written agreement the statute mentions is a question for a lawyer.

Five situations, and what the law does with each

Find the card closest to your situation. Each one names the part of the statute, or the city rule, that settles it.

  • My neighbor won't pay their share

    Start with the paperwork: Section 841 calls for 30 days' written notice before you take on fence costs, and a notice missing a required part invites an argument you don't need. If you sent a complete one and they still refuse, offer mediation; Community Boards, a San Francisco nonprofit founded in 1976, offers neighborhood mediation. If the work goes ahead and they won't pay, the courts' self-help site says to ask for the money first, in person, by letter or by email, before you file in small claims. Keep the notice, proof of delivery, the estimate, the invoice and dated photos.

  • My neighbor sent me a notice

    Read it against the statute: it should state the presumption of equal responsibility and describe the problem, the fix, the estimated cost, the proposed split and the timeline. Then answer in writing inside the 30 days. You can agree, propose a cheaper repair, get your own estimate, or explain why an even split would be unjust: the cost far outweighs your benefit, exceeds what the fence adds to the property's value, would be an undue hardship, or comes from their preferences, such as a taller or fancier design. Ignoring it is the weakest option.

  • A storm or a tree knocked it down

    Photograph everything before cleanup, including each broken post at ground level. Then read your policy for other structures coverage, which the state Department of Insurance's homeowners guide describes as covering structures not attached to the house; ask your insurer whether the fence counts. The department lists windstorm and falling objects among perils policies typically cover, and wear and tear among those they usually don't, which matters if the posts had rotted. A necessary replacement is still presumed a shared cost under 841, so the 30-day notice applies; put up a temporary barrier on your own side if you need one sooner.

  • I want it taller

    Check the city's numbers first: San Francisco Planning allows up to 10 feet in required rear and side yards, and 3 feet solid or 6 feet at least 75% open in a required front setback; over 6 feet at a side or rear line also needs a building permit. A court may weigh costs that come from one owner's aesthetic preferences, so plan to pay for extra height yourself unless the neighbor wants it too. And don't build tall to make a point: under Civil Code 841.4, a fence unnecessarily over 10 feet, put up or kept maliciously to annoy the neighbor, is a private nuisance.

  • The fence isn't on the property line

    Where a fence stands proves little about where the line runs. In California only a land surveyor with a current license, or a civil engineer whose license predates 1982, may survey a boundary, according to the state's engineering and surveying board. Get the line surveyed before you pay for anything built on it, and don't take down a fence you don't solely own. If a fence has stood off the line for years, or one neighbor has used the strip, see a lawyer first: long use of land raises legal questions a survey won't settle.

The 30-day notice, piece by piece

Section 841(b)(2) requires 30 days' prior written notice to each affected neighbor before you incur costs for a dividing fence, and lists what it must contain. The outline starts with those required parts, marked as such, then adds details that keep a reasonable neighbor from saying no for the wrong reasons. It is a sample structure for your own letter, not a legal form.

  1. Date, names and the fence. Your name and address, the neighbor's, and which fence: for example, the run along the shared rear lot line from the garage corner to the side gate.
  2. The presumption (required). A sentence saying that under Civil Code 841, adjoining owners are presumed equally responsible for the reasonable costs of construction, maintenance or necessary replacement of the dividing fence.
  3. The problem (required). What is wrong and how you know: leaning sections, rotted posts, missing boards, storm damage. Attach dated photos.
  4. The proposed solution (required). Repair or replace, and with what: height, material, posts and footings, and whether the gate stays.
  5. The estimated cost (required). The figure from a written estimate, with the estimate attached.
  6. The proposed split (required). Half each, or a different split and why.
  7. The proposed timeline (required). A start date no sooner than 30 days after the notice, and roughly how long the work takes.
  8. Who will do the work. The contractor's name and CSLB license number, or the handyman's name if the job fits the minor-work exemption.
  9. Any permit. In San Francisco, say so if the new fence tops 6 feet at a side or rear line.
  10. How to respond. A date, a phone number and an email, and an offer to meet at the fence or weigh another estimate.
  11. How payment works. Each owner paying the contractor directly, or one paying and the other reimbursing by a set date.
  12. Signature and delivery record. Keep a copy and proof of delivery; the statute requires writing but doesn't say how to deliver it.

From the first conversation to a paid share

  1. Before any letter

    Talk at the fence

    Walk it together and agree on what's wrong. A neighbor who has seen the rotted posts is easier to bring along than one who first reads about them.

  2. Day 0

    Send the written notice

    Every required part, with the estimate and photos attached. Keep a copy and proof of delivery.

  3. Days 1 to 30

    Let the neighbor answer

    They may agree, question the cost, bring their own estimate or argue an even split would be unjust. Answer in writing.

  4. Day 31 or later

    Do the work

    Follow the notice's timeline, pull the permit if one is needed, and photograph before, during and after.

  5. After the work

    Ask for the share

    Send the final invoice and ask for payment. The courts expect you to have asked before you file in small claims.

  6. If they refuse

    Mediation, then small claims

    Offer mediation first. If that fails, the courts' self-help guide explains whether small claims fits and what an individual can claim there.

Talk at the fence first, then put it in writing: the law expects the letter, and the neighbor deserves the conversation.

How tall a fence can be in San Francisco

San Francisco Planning's fence guidance, a page updated in May 2026 with a handout dated January 2019, sets limits by where the fence stands. No building permit is required for a fence 3 feet or less at the front of a property, or 6 feet or less at the side or rear property lines. Fences up to 10 feet need no neighborhood notification and are usually approved over the counter if they meet the yard rules.

Plan of a narrow San Francisco lot with fence height zones: the public sidewalk with a low fence stub crossing the property line, the front setback with an open iron fence, a side yard, the house's buildable area, the rear yard with a tall board fence, and a retaining wall with a fence on top at the back
  1. Sidewalk Past your property line, a fence is Public Works' call, and anything over 3 feet is typically refused.
  2. Required front setback 3 feet if solid, or 6 feet if at least 75% open, like wrought iron. A solid 3 feet with lattice on top doesn't qualify.
  3. Required side yard Only on some RH-1(D) lots 28 feet or wider. Fences up to 10 feet.
  4. Buildable area Only the lot's height limit applies, but over 10 feet can bring neighborhood notice and design review.
  5. Required rear yard Up to 10 feet above grade, with a building permit over 6 feet.
  6. Retaining wall at the back Where lots step down, up to 6 feet of fence above the wall may be allowed case by case. More
San Francisco fence limits at a glance, from Planning and Public Works guidance
Where the fence standsHeight limitBuilding permitWho reviews it
On the sidewalk, past your property lineOver 3 feet typically not allowed; up to 3 feet case by caseA Minor Sidewalk Encroachment permit insteadPublic Works, with 15-day public notice for a new fence
Required front setback3 feet solid, or 6 feet if 75% openNot needed up to 3 feetPlanning counter
Required side yard10 feetNot needed up to 6 feetPlanning counter
Required rear yard10 feet above gradeNot needed up to 6 feetPlanning counter
Buildable areaThe lot's height limitAsk the Permit CenterNeighborhood notice may apply over 10 feet

Does my lot even have a front setback?

Front setbacks apply in the RH, RM and RTO districts that cover most residential neighborhoods. The requirement is usually the average of the two neighboring buildings' setbacks, capped at 15% of lot depth or 15 feet, whichever is less. Where both neighbors are built right to the front line, your lot has no front setback requirement at all.

One caveat: these numbers come from Planning's guidance, and the Building Code's own list of work exempt from permits couldn't be checked for this guide. Generic California fence articles often quote limits that aren't San Francisco's. Before building anything over 6 feet or in a front setback, confirm at the Permit Center, 49 South Van Ness Avenue; the permits guide covers the process.

When a retaining wall holds up the fence

On a hillside lot, the back fence may stand on a retaining wall that holds up the neighbor's yard, or yours. Planning's handout allows for that: where grades differ a lot between lots, the Zoning Administrator may authorize a fence up to 6 feet above a retaining wall, case by case, whatever its height above the lower yard. The wall is the bigger question. If it leans, bulges or cracks, deal with it before a new fence goes on top.

Cross-section of two back yards at different grades: a block retaining wall holds up the upper yard's soil, with gravel and a drain behind it, and a board fence stands on top of the wall; the fence may go up to 6 feet above the wall, case by case fence up to 6 ftcase by case upper yardlower yardretaining wall
Two backyards at different grades: the wall holds the soil and the fence sits on top. Planning may allow up to 6 feet of fence above the wall, case by case.

California's engineering board lists retaining walls among the things civil engineers design and repair, and says the city's building department can tell you when an engineer is required. Section 841's presumption is written about fences; who pays for a failing retaining wall, especially one holding up only one neighbor's soil, is a question for a lawyer. If the wall is part of a wider drainage problem, the rainy season checklist covers what to check before winter.

Who can build or fix the fence

Fencing has its own contractor's license: the CSLB's C-13 Fencing class covers building, altering and repairing fences, posts and gates, but not masonry walls. A handyman without a contractor's license can take a fence job only when the whole job is under $1,000 in labor and materials, needs no building permit and isn't split off a larger job, under Business and Professions Code 7048. In San Francisco that rules out any fence over 6 feet at a side or rear line.

Ask about the posts before the boards: whether the old footings stay or come out, and what the new posts will sit in. HUD's guide has inspectors check wood fences for rot and insects, and lists fences among the spots where wood touches soil that termite inspections cover. Where new footings mean real concrete work, concrete contractors take that part. Before signing, read the guide to hiring a handyman.

Questions people ask

Do I have to pay for half of my neighbor's new fence in California?

Often, but not automatically. Civil Code 841 presumes neighbors share the reasonable cost of a dividing fence equally unless they agreed otherwise in writing. You can rebut that by showing an equal share would be unjust: the burden far outweighs your benefit, the cost exceeds the value the fence adds, it would be an undue hardship, or the cost comes from their preferences. Answer their notice in writing within the 30 days.

What has to be in a Civil Code 841 notice?

Section 841(b)(2) requires written notice at least 30 days before costs are incurred, sent to each affected neighbor. It must state the presumption of equal responsibility and describe the problem, the proposed solution, the estimated construction or maintenance cost, the proposed cost-sharing approach and the proposed timeline. Photos and a contractor's license number are good practice rather than requirements.

How tall can a backyard fence be in San Francisco?

Up to 10 feet above grade in a required rear yard, under SF Planning's guidance, usually approved over the counter. Anything over 6 feet at a side or rear property line needs a building permit. Taller than 10 feet takes a variance in a required yard; in the buildable area it can bring neighborhood notification and design review. Confirm the limits for your lot at the Permit Center.

Does Civil Code 841 apply if my neighbor is the city or a school district?

No. The statute defines a landowner as a private person or entity holding a possessory interest in real property, and leaves out cities, counties, districts, public corporations and other public bodies or agencies. A fence along a park, a school or a city-owned lot falls outside the presumption of equal sharing, so contact the agency that owns the land.

Will homeowners insurance pay for a fence that blew down?

It depends on the policy. The California Department of Insurance describes other structures coverage as protecting structures not attached to the house, and lists windstorm and falling objects among perils standard policies typically cover. Wear and tear and maintenance are typically excluded, so rotted posts can complicate a claim. Photograph the damage before cleanup and ask your insurer whether the fence is covered.

Can a handyman fix my fence, or do I need a fence contractor?

A handyman without a contractor's license can take the job only if the whole thing is under $1,000 in labor and materials, needs no building permit, and isn't split from a larger job, under Business and Professions Code 7048. Bigger repairs and replacements go to a licensed contractor; fencing is the CSLB's C-13 class. Check the license number at cslb.ca.gov before you sign.

Pros who take this work

Where these facts come from

Checked against these public pages in October 2026. Programs and rules change; the agency's own page is the final word. This guide is general information, not legal or engineering advice.

  1. Civil Code 841: boundaries and fences (effective January 1, 2014) California Legislative Information
  2. Civil Code 841.4: fences over 10 feet as a private nuisance California Legislative Information
  3. Business and Professions Code 7048 (amended effective January 1, 2026) California Legislative Information
  4. Fences (guidelines page, last updated May 10, 2026) San Francisco Planning
  5. General Planning Information: Fences (January 2019) San Francisco Planning
  6. Minor Sidewalk Encroachment Permit San Francisco Public Works
  7. C-13: Fencing Contractor Contractors State License Board
  8. Residential Insurance: Homeowners and Renters (revised January 2026) California Department of Insurance
  9. A Guide for Consumers: Professional Engineering and Land Surveying Board for Professional Engineers, Land Surveyors, and Geologists
  10. Small claims: before you start Judicial Branch of California
  11. Small claims: ask for the money Judicial Branch of California
  12. Community Boards: conflict resolution and mediation Community Boards
  13. Residential Rehabilitation Inspection Guide (February 2000) U.S. Department of Housing and Urban Development

Your turn

Get an estimate to fix or replace the fence

Send the fence's length, height and a photo or two. Local fence pros call or text, and a written estimate gives your 30-day notice its cost figure.

  • Free to request. You pay only the person you choose to hire, at the price you agree.
  • Local pros who take this work call or text you to ask questions and quote. Up to five of them.
  • Two short steps. A few sentences and a photo or two are enough.
  • Rather talk? Call or text (415) 449-8213.

Get an estimate to fix or replace the fence

Two short steps. A local pro who does this work calls or texts you back.

To send a request, call or text (415) 449-8213.

Free to request, and you agree the scope and price with the person you hire before work starts. In California, a job over $1,000 in labor and materials, or one that needs a building permit, must be done by a contractor licensed by the CSLB in the right class. Ask for the license number and check it at cslb.ca.gov.

HandymanNow for handymen Work in the Bay Area? Get job leads by text. Pick your trades and areas, take only the jobs you want. No subscription. Start getting leads HandymanNow for homeowners Get the HandymanNow app. Send a request with photos, message your handyman and follow them on the way. Download the app

HandymanNow app

Fix it faster. Find work faster.

Homeowners send a job with photos and follow their handyman on the map. Handymen get local jobs by text and take only the ones they want.

Call Get a quote