A McLean building firm that in five years has become the largest constructor of single-family homes in Fairfax County last week sold shares to the public for the first time to raise capital for its expanding operations.

NVHomes L. P., a limited partnership, sold more than 2 million units of limited partnership interests at a price of $12 per unit. After paying underwriting commissions and administrative expenses, the company expects to net $21.8 million. A key reason for the offering, a company official said, is to give NVHomes easier access to credit -- the company can now open lines of credit with financial institutions rather than borrowing funds on a house-by-house basis.

"When you build 800 to 1,000 houses a year, it is a very cumbersome and costly process" to fund operations on a piecemeal basis, said James J. Martell, vice president of finance.

"With the influx of new capital, we'll be able to get better financing," he said.

NVHomes and its affiliated companies were the brainchild of Dwight C. Schar, the company's chairman of the board. Schar, 44, set up operations in 1980 and oversaw the firm's expansion into one of the biggest builders and sellers of single-family houses and condominiums in the Washington area.

A prospectus issued by the company in conjunction with the offering shows its growth has been rapid. In 1985, the company sold 785 homes, up from 198 in 1981, according to the prospectus.

NVHomes reported earnings of $6.1 million for 1985, compared with $2.4 million in 1984. The company showed revenue of $113.6 million in 1985, up 26.9 percent from $89.5 million in 1984.

While the company has thus far concentrated most of its operations in Fairfax and Montgomery counties, Martell said NVHomes is planning to expand into other areas.

The company has begun construction of a 96-unit condominium community in Prince William County. The company also plans to build more lower-priced houses to attract younger home buyers, Martell said. NVHomes' models typically are priced in the $150,000-to-$350,000 range.

Donaldson, Lufkin & Jenrette was one of the main underwriters of last week's offering.

Even after last week's offering, nearly 80 percent of the firm's units remain in the hands of a small group of founders, officers and directors. The most sizable block of shares, more than 30 percent, is controlled by Schar himself, according to the prospectus.