Have you ever cancelled an annual insurance policy%. 6 months , your coverage period, into the policy the expired premium will be 73%. This amount is determined in accordance with the Rule of 78, sometimes called the sum of the digits method.
In your case, the sum of the digits for the contract is 78. The sum of the digits for the remainder of the term is 27. Therefore the remaining portion the premium is 21/78 or 27%. I have no idea what the premium was but based on the Rule of 78, you would be entitled to a refund of 27% of the original premium.
The formula is (N*(N+1))/2. Where N is the number of periods. This also happens to be the calculation basis for the expired premium for things like maintenance contracts, most consumer loans, etc.