The United Way in Brevard, NC has created a very handy guide for building an accessory dwelling unit (small house on a foundation in the backyard of an existing home). They project the costs to be between $30,000 (if you do all the work yourself) to $60,000.
While the information is specific to Brevard, much of it would also be applicable to other states. Be sure to check zoning in your neighborhood, though. Only some areas allow ADUs.
Document (.pdf): Build ADU Brevard NC