It depends on the Bank. But most formulae seem to link the breakage charge to the difference between the rate you fixed at, and the prevailing fixed rate at the breakout date.
AIB calculate your breakout charge as the difference between the interest rate you fixed at and the interest rate on the breakout day, by the amount outstaning on your mortgage, by the length of time left of the fixed period.
Example:
Person takes out €500k mortgage on 1 Jan 2007 and fixes at 4.5% for three years.
Breakout June 2007
Assume three year fixed rate in June 2007 is 4.25%, breakout cost is €3,1.25. (.25% X €500k X 2.5 years).
Breakout December 2007
Assume three year fixed rate in December 2007 is 4.00 %, breakout cost is €6,250. (.5% X €500k X 2.5 years).
I have not taken into account the reducing balance of the amount outstanding as it will make little difference in the first 12 months.