The economy continued to grow at a vigorous pace in the second three months of the year, the Commerce Department said yesterday.

Although the department will not formally release its preliminary report on the second quarter gross national product until Thursday, the agency's monthly Survey of Current Business said that based on data available in mid-June, it appears that the economy would grow at about the same strong 7 per cent rate at which it grew in the first quarter.

Real gross national product is the broadest measure of economic activity economists have. It is the value of all goods and service produced by American citizens after accounting for inflation. Real GNP is measured in constant 1972 dollars.

After a marked slowdown in economic growth through much of the last nine months of 1976, the economy has grown sharply and unemployment has fallen so far this year.

The Commerce Department said yesterday that individual buying did not increase in the second quarter, but all other elements of final sales - fixed investment, net exports and government purchases - rose.

The department said there were two major shifts in demand in the second quarter: sales of motor vehicles, which accounted for $11.5 billion of the $13.5 billion increase in final sales in the first quarter, declined slightly in the second quarter, while outlays on buildings which fell $2 billion in the first quarter, increased $7 billion between April and June.

The Commerce Department also said that prices accelerated in the second quarter, despite a slowdown in food inflation during May and June.