Federal Home Loan Mortgage Corp., the congressionally chartered home mortgage financier, yesterday reported an 11 percent gain in second-quarter earnings and a 9 percent increase for the first half.

Freddie Mac said the higher profits were the result of a growing loan portfolio and a better interest margin -- basically, the difference between the interest rate at which Freddie Mac lends money and the rate it must pay to borrow it.

The Reston-based company reported a second-quarter profit of $118 million ($1.97 a share), compared with $106 million ($1.77) in the 1989 second quarter.

For the first half, Freddie Mac earned $229 million ($3.82), up from $210 million ($3.51) in the 1989 first half. Freddie Mac's assets stood at $40.7 billion as of June 30, compared with $33.2 billion at the same point last year.

The corporation attributed its higher earnings to a $44 million, or 17 percent, increase in its net interest margin. The factors behind the higher margin were a $23 million gain in management and guarantee fees and a decline in short-term interest rates, while its portfolio grew.

Mortgage losses through June 30 totaled $105 million, compared with $112 million for the 1989 first half, and were down for the second quarter as well, Freddie Mac said.