The legal definition of a dwelling unit, under the International Residential Code that most jurisdictions follow, is a single self-contained space that provides complete independent living facilities for one or more people. That means permanent, built-in provisions for five functions under one roof: living, sleeping, eating, cooking, and sanitation. If an occupant has to walk outside the unit or cross a shared hallway to reach any of those facilities, the space does not qualify.
The Five-Function Test
IRC Section R202 is the source most building departments, assessors, and courts work from. The phrase that carries the weight is “complete independent living facilities.” Every other requirement flows from it.
A finished basement with a bed and a television is not a dwelling unit. A garage conversion with a microwave and a mini-fridge but no plumbing is not a dwelling unit. A guest suite that shares a kitchen with the main house is not a dwelling unit. The test is whether the space could sustain daily life without relying on any facility outside its walls. The presence of permanent cooking facilities is often the single factor that pushes a space from “accessory room” to “dwelling unit” in the eyes of a building inspector or tax assessor.
What the Space Must Physically Contain
The code translates the five-function test into concrete, inspectable requirements. A space that qualifies has to meet all of them, not most.
Habitable Rooms
Every habitable room other than a kitchen must have at least 70 square feet of floor area and measure no less than 7 feet in any horizontal direction. Ceiling height for habitable rooms and hallways is 7 feet minimum; bathrooms, toilet rooms, and laundry rooms can drop to 6 feet 8 inches. In rooms with sloped ceilings, any portion under 5 feet of clearance does not count toward the floor-area minimum. The old requirement that at least one room be 120 square feet was removed in the 2015 code cycle; jurisdictions still enforcing it are working from a local amendment, not the current model code.1International Code Council. 2015 IRC Significant Changes
Natural Light and Ventilation
Habitable rooms need windows or skylights with glass area equal to at least 8 percent of the room’s floor area, and openable area (windows, doors, or louvers to the outdoors) equal to at least 4 percent. A 100-square-foot bedroom needs 8 square feet of glazing and 4 square feet of openable area. Rooms can share these calculations only when connected by an opening of at least half the common wall and no less than 25 square feet.
Heating
In any climate where the winter design temperature drops below 60°F, the unit needs a permanent heating system capable of holding habitable rooms at 68°F, measured three feet above the floor and two feet from exterior walls. Portable space heaters do not satisfy this. Inspectors expect a furnace, boiler, heat pump, or hardwired electric system that stays part of the building year-round.
Plumbing and Kitchen
The unit must have potable water delivered to a kitchen sink, a toilet, a lavatory (washbasin), and either a bathtub or a shower, with every fixture connected to an approved sewage disposal system.2International Code Council. IRC 2018 Chapter 27 Plumbing Fixtures The kitchen needs a sink with hot and cold running water and a permanent cooking appliance. A full range is most common; many jurisdictions accept a built-in cooktop that meets local fire codes. A countertop microwave does not count.
Emergency Egress and Alarms
Every sleeping room and habitable basement space needs at least one emergency escape opening leading directly outside, with a minimum net clear opening of 5.7 square feet, minimum dimensions around 24 inches high and 20 inches wide, and a sill no higher than 44 inches from the finished floor. Smoke alarms are required in every sleeping room, in the hallway outside each sleeping area, and on every additional story including the basement. Carbon monoxide alarms are required on each level with a sleeping area and on any floor with a fuel-burning appliance or attached garage. New construction requires hardwired units with battery backup.
The IRS Uses a Looser Definition
The building code is not the only definition that matters, and the IRS version is broader. Under IRS Publication 527, a dwelling unit includes a house, apartment, condominium, mobile home, boat, or vacation home as long as it has sleeping space, a toilet, and cooking facilities. The IRS does not require the permanent infrastructure the building code demands. A houseboat with a portable stove can qualify for the IRS while failing a building inspection.3Internal Revenue Service. Publication 527, Residential Rental Property
The IRS classification matters most for rental owners. If a property meets the IRS dwelling unit test and is rented out, the owner can deduct expenses like mortgage interest, insurance, and depreciation against rental income. The personal-use rule sets a trap: if the owner uses the unit personally for more than 14 days or 10 percent of total rental days (whichever is greater), the IRS treats it as a personal residence and limits deductible losses to the amount of rental income received.3Internal Revenue Service. Publication 527, Residential Rental Property
The definition also affects the home mortgage interest deduction. Under IRS Publication 936, a “qualified home” must have sleeping, cooking, and toilet facilities. If part of a home is rented as a self-contained unit with its own sleeping, cooking, and toilet facilities, that portion falls outside the owner’s qualified home, and mortgage interest must be allocated between the personal and rental portions.4Internal Revenue Service. Publication 936, Home Mortgage Interest Deduction
How FHA Lending Treats Dwelling Units and ADUs
FHA guidelines now explicitly address properties with accessory dwelling units, following HUD’s Mortgagee Letter 2023-17. An ADU under FHA rules is a habitable living unit with its own entrance that is smaller and secondary to the primary dwelling, and the ADU plus the primary home must constitute a single real estate interest on one lot. Utilities can be shared or separately metered.5U.S. Department of Housing and Urban Development. Mortgagee Letter 2023-17
The appraiser decides whether the property is a single-family home with an ADU or a two-family dwelling, and that call affects the loan program, down payment, and whether ADU rental income can help the borrower qualify. An unpermitted ADU is a separate problem: FHA appraisers generally cannot assign value to space that lacks a certificate of occupancy, so the borrower loses the benefit of the added square footage and the potential rental income in the loan calculation.5U.S. Department of Housing and Urban Development. Mortgagee Letter 2023-17
What Happens When a Space Does Not Qualify
Operating an unpermitted or non-qualifying dwelling unit carries real consequences, and insurance is usually the first casualty. Homeowner policies routinely exclude coverage for damage tied to construction that was never permitted or inspected. If an electrical fire starts in an unpermitted basement apartment, the insurer can deny the claim on the grounds that the work was not built to code. If the insurer discovers unpermitted living space during a claim investigation, they may cancel the policy or refuse to renew it.
Landlords face a separate set of risks. A rental agreement for a space that does not legally qualify as a dwelling may be unenforceable in court. Tenants often have defenses against eviction and may be able to recover rent already paid. The landlord also carries personal liability if a tenant or guest is injured in a space that was never inspected for safety compliance. Renting out a space insured only for personal use can void the residential classification on the homeowner’s policy, leaving the owner exposed on both sides.
On the tax side, claiming rental deductions on a space that does not meet the IRS dwelling unit definition invites an audit adjustment. If the IRS finds the space lacks sleeping, cooking, or toilet facilities, expenses claimed against rental income get disallowed, and the owner may owe back taxes plus interest. The fix is almost always cheaper than the fallout: bring the space up to code, pull the permits, get the certificate of occupancy, and register the unit before collecting rent.