The childhood home of Jackie Kennedy Onassis, which also was a vacation place for John F. Kennedy during his presidential years, and the last farm in Newport, R.I., sold yesterday for $825,000.

Hammersmith Farm was sold to a group of "six or seven" investors headed by Edward F. Sughrue, a Whitinsville, Mass. attorney. They plan to farm the 54-acre property and its 28-room cottage" into a museum of Newport and Kennedy history, of Sughrue told Sotheby Parke Bernet agents for the sale.

Many of the original furnishings remain in the house, including a desk used by President Kennedy and the twin beds where he slept and his wife slept.

Jacqueline Onassis' mother, Janet Auchinclose, sold the property after a weekend of discussion with Mrs. Onassis, her sister Lee Radziwill and Mrs. Auchinclose's other daughter, Janet Rutherford. Though the property sold for $160,000 less than the $985,000 asking price, Mrs. Auchinclose apparently preferred to see the property preserved as a museum.

Sughrue told Sotheby Parke Bernet that he and his group planned to build seven homes on 14 acres of the estate, reserving the rest with the mansion and farm buildings for the museum.

Mrs. Auchincloss has reserved about 10 acres, a 1720 house called "The Castel," and a windmill/guest house for her own residence.

The 28-room great house, called a "cottage" in the Newport manner, was designed in 1887 by R. H. Robertson. Frederick Law Olmsted, who designed the U.S. Capitol grounds planned the gardens.

The estate has been owned by only three previous families, according to Charles H. Seiheimer Jr., president of the Sotheby company. "It was named for the borough in England of its original owner, William Brenton." Currently the Swedish team competing for the American's Cup is occupying the house, which face Narragansett Bay and Block Island Sound.