If you are an employee with at least 2 years in your job, you are entitled to a redundancy payment.
The law sets a minimum payment. This is normally paid by your employer, but the state will pay if your employer has gone bust.
Of course, many better employers pay more than the minimum compensation when making someone's job redundant. Sometimes there will be a redundancy scheme in your contract of employment, in other cases your union will be able to negotiate more than the minimum and sometimes employers want to soften the blow, especially if they are looking for volunteers for redundancy.
But if you are only getting the legal minimum, this is how it is worked out:
A maximum of 20 years' service is taken into account and there is a limit to a week's pay for statutory redundancy purposes, which in 2012 was set at £430. This means that the maximum payment under the statutory scheme is currently £12,900 - i.e. 30 weeks at £430.
Dealing with the Downturn TUC/Citizens Advice leaflet in Adobe pdf format. Facing Redundancy Know Your Rights leaflet from the TUC in Adobe pdf format.