A customer cancels a twelve-month policy after four months. How much do you refund?
It depends on who cancelled and why: pro rata returns the unused share, short rate keeps a penalty, and which applies is set by the policy wording and the jurisdiction rather than by the system. Fees are usually not refundable, and the calculation has to be reproducible years later.
What the interviewer is scoring
- Does the candidate ask who cancelled before computing anything
- Whether pro rata and short rate are distinguished and attributed to the wording rather than to code
- That fees and taxes are handled separately from premium
- Whether the calculation is made reproducible rather than merely correct today
- Does the candidate raise a claim already paid on the policy as a complication
Answer
Ask who cancelled first
The arithmetic is easy and it is not the question. The first thing to establish is who initiated the cancellation and for what reason, because that decides which basis applies, and the basis is set in the filed policy wording rather than chosen by the system.
Broadly, and with the caveat that this varies by jurisdiction and by product:
The customer cancels voluntarily. Many products apply a short rate basis, which returns less than the unused proportion. The insurer has already incurred acquisition cost — commission, underwriting, issuing documents — and the risk is not evenly distributed across the term for some perils, so a straight time split would leave the insurer short on every early cancellation.
The insurer cancels, for non-payment or because it is withdrawing from a risk. Here pro rata is the norm: the customer did not choose this, so penalising them for it is not defensible, and in many jurisdictions not permitted.
The customer cancels inside a statutory cooling-off period. A full or near-full refund typically applies regardless of the above, subject to whether cover was actually provided in the window.
A candidate who computes a number before asking which of these applies has answered a different question.
The two bases, worked
Take a twelve-month policy, premium 1,200, cancelled at the end of month four, so eight months remain.
Pro rata
Unearned fraction = 243 days remaining / 365 days = 0.6658
Return premium = 1,200.00 x 0.6658 = 798.90
Short rate, using a filed table where 4 months earned = 45%
Earned = 1,200.00 x 0.45 = 540.00
Return premium = 1,200.00 - 540.00 = 660.00
Difference retained by the insurer = 138.90
Two things to notice. The pro rata split is by days, not months — twelve months are not equal lengths, and a monthly approximation drifts by real money across a book. And the short-rate percentage comes from a filed table, not from a formula someone invented: it is part of the product's regulatory filing, which means it is versioned by state and effective date and cannot be changed quietly.
Premium is not the whole invoice
The customer paid more than premium, and the components behave differently.
Policy fees are frequently fully earned at inception and not returned. Taxes and levies follow the premium — insurance premium tax computed on the returned amount must be returned too, and the return has to be reported in the period it happened, which is why finance cares about the accounting date rather than only the effective date. Instalment charges already applied are generally kept. Commission paid to the intermediary is usually clawed back in proportion, which is its own reconciliation with a third party.
So the refund is a set of postings against several accounts rather than one
number, and a design that stores a single premium on the policy and computes a
percentage of it will be wrong on the first product that has a fee.
The complications that decide the design
A claim was paid. On some products a paid claim means no return premium at all: the cover did what it was sold to do, and the sum insured for that period has been used. On others the return is unaffected. This is a wording question, not an engineering one, and the system must be able to express both — which means the cancellation calculation needs to see the claim history rather than only the policy.
The cancellation is backdated. A cancellation effective from a date already past is ordinary, and it interacts with everything that happened in between. If a claim was notified during a period the policy is now cancelled from, that is a coverage dispute rather than a calculation. This is the effective-dated problem appearing again, and it is why cancellation cannot be modelled as setting a status flag.
The policy was endorsed mid-term. The premium is no longer one figure; it is a sequence of amounts each valid for a period. The unearned calculation has to run over the segments rather than over the original premium, and a system that overwrote the premium on endorsement cannot do it.
Make it reproducible, not just correct
The requirement that shapes the implementation is that somebody may query this in three years — a complaint, an ombudsman referral, a market conduct examination — and you must produce the same number with an explanation.
That means storing the inputs and the decision, not only the result: which basis applied and why, which version of which short-rate table was used, the effective date, the day count, the segments of premium in force, what was treated as fully earned, and who or what initiated the cancellation. Recomputing from today's tables would give a different answer the moment a rate filing changes, which is precisely the situation the record exists to survive.
The related test-suite habit is worth mentioning in an interview: a corpus of historical cancellations with their known outputs, re-run against every build, so that a change to a shared rounding rule cannot silently move a product it was not aimed at.
Rounding is not a detail here
Money arithmetic in this domain is integer minor units with a stated rounding rule applied at a stated step, because a filed algorithm specifies the order of operations. Compute the fraction in floating point, multiply, and round once at the end, and you will differ by a penny from the filed method — which is a deviation from what the regulator was told, and across a book of a million policies it is a real number that never reconciles.
Nobody can tell you the refund until you say who cancelled and what the wording says. The arithmetic is the last step and the smallest part.
Likely follow-ups
- The insurer cancels for non-payment rather than the customer. Does the basis change?
- A claim was paid in month two. Does that change what you return?
- How would you reproduce this calculation for a complaint raised in three years?
- Where does the tax on the returned premium go?
Related questions
- How does your order placement change on a venue that allocates pro rata within a price level instead of first in, first out?hardAlso on pro-rata6 min
- A broker asks you to backdate a cover change to three months ago. How do you model the policy so that works?hardAlso on policy-administration5 min
- A client disconnects but your server keeps working on their request. How does cancellation actually propagate in .NET?mediumAlso on cancellation4 min
- You run ten coroutines concurrently and one of them raises. What happens to the other nine?hardAlso on cancellation5 min
- A client hangs up halfway through a request. How do you structure a Go HTTP service so it stops doing the work?mediumAlso on cancellation7 min
- Two teams own two services that talk to each other. How do you stop one breaking the other without running both together in a shared environment?mediumSame kind of round: concept4 min
- What does least privilege look like in practice, and what is separation of duties there to prevent?mediumSame kind of round: concept6 min
- How do you design a system so an auditor can prove who accessed a record and why?mediumSame kind of round: design8 min