Sen. Edward M. Kenndy (D-Mass.) and his wife owed $166,151 in federal taxes last year on a total income of about a half million dollars and overpaid the government by $40,000, their 1979 tax return showed yesterday.

The joint return, released by Kennedy's campaign headquarters, showed that he had a higher income than President Carter and paid more in taxes last year.

Carter last Tuesday made public his return, showing a total of $195,527 and claiming a refund of $16,703. A breakdown of his financial assets and liabilities showed that his net worth plunged below the $1 million mark in 1979.

Presidential press secretary Jody Powell had challenged Kennedy and the Republican candidates to "meet the same standard" as the president.

Kennedy's return showed that much of his annual income of $501,1978 came from trusts, except for the $58,000 salary as a senator.

Kennedy reported $216,000 in deductions -- including more than $40,000 spent on expenses for his Boston and Washington offices.

On a net taxable income of $285,436, Kennedy's accountants figured the total tax was $166,151, or 58.2 percent. That compares with the $65,944 Carter said he paid in 1979 federal taxes.

Kennedy estimated that $17,075 had been withheld during the year by the Internal Revenue Service and he had made $190,000 in estimated tax payments for 1979 and credits from the previous year's return.

Thus Kennedy calculated he had overpaid by $40,924, and asked to have that amount credited to his 1980 taxes.

Kennedy's wife, Joan, was listed as "homemaker" on the joint return, and the Kennedys claimed a total of five exceptions -- counting themselves and three children, Kara, Edward Jr. and Patrick.