gnasher729's answer does an excellent job of covering the general rules for how tax and NI is calculated. However, specifically addressing:
In case I do leave by the end of the year, can anyone please, tell me (or teach me how to calculate or find out) how much will I wind up losing because of this 'bonus'?
Broadly speaking, as long as you don't cross from one tax-threshold to another (i.e. earn enough to put you in a different tax band), then you shouldn't "lose out" if you had to repay the bonus (although it's possible it may take a month or two for things to "settle out").
The month it is paid, you will pay extra tax and NI, but the month it is "clawed-back" you would have a lower gross salary and therefore pay less tax and NI. Roughly speaking, the extra paid when you get the bonus should match the reduction you get when your final month's salary is reduced by that amount1.
Using the first salary calculator I found, I got the following figures:
With Bonus Normal Month Claw-back
---------- ------------ ------------
Basic Income 2,250.00 2,250.00 2,250.00
Bonus 1,732.50 -.-- -866.25
Gross Income 3,982.50 2,250.00 1,383.75
Taxable Income 2,995.00 1,262.50 396.25
Tax 599.00 252.50 79.25
NI 381.66 185.76 81.81
Take Home 3,001.84 1,811.74 1,222.69
-589.05 x 2
Difference +1,190.10 -1,178.10
The first column shows the month you get the bonus (the figures for tax and NI are fairly close to yours2). The second column shows a "normal" month. From these, you can see you get "take home" bonus of just under £1,200.
The last column needs a little explanation. While the calculator will show the effect of a one-off bonus, it won't show the effect of a one-off deduction. For the month you pay back the bonus, your gross salary would be £2250 - £1732.50 or £517.50. If you enter the equivalent yearly salary of this (£6,210) then because that is below the tax-free threshold, it doesn't show any tax/NI being deducted.
Instead, I have notionally split the repayment over two months and used a gross yearly salary that is equivalent to a monthly salary of £1,383.75 (= normal salary less half the bonus). This results in a reduction over a normal month's salary of just under £590, or £1180 for two months. This is fairly close to the extra you got when the bonus was paid (£1190) so the two more-or-less cancel each other out (if anything, these figures show a slight gain of ~£10).
By my estimation, what you gain in the month when the bonus is paid will be fairly close to what you lose in the month when it is clawed-back.
What might be of more worry is that if they do claw it all back in one month, although you shouldn't lose out overall, you are liable to have a very small pay packet: something in the region of £633 (£1811 for a normal month less the £1178 estimated cost of claw-back).
1 Were the claw-back to happen right at the start of the tax year, it might complicate things: as gnasher729 notes, the calculations are based on your taxable-pay-to-date, and a partial assumption that the current month is "typical". If everything was clawed-back in the first month of a tax year, your "assumed yearly pay" would be very low (12 x 517.50, or £6,210) meaning you probably wouldn't pay any tax that month. However, the saving over a normal month (~£250) wouldn't cover the extra you paid when you got the bonus (~£350).
This might sort itself out later in the year, but it might not. However, if – as you say – the claw-back happens if you "were to leave before [the end] of this calendar year", then this shouldn't be an issue.
2 In my experience, there is rarely a "to the penny" agreement for this sort of calculation: it may depend on whether the bonus is treated as a true "one off" payment, or is assumed to reflect a raise (and hence you'd be paying more throughout the year). Also, as the tax-calculator I used notes using these figures:
You might find that about an extra £24.00 of income tax than indicated is actually deducted from your bonus payslip. This is because your earnings in this pay period put you over the income tax threshold for the month, but not for the year. Normally, this "extra tax" is refunded in subsequent payslips.
The point is that the figures are "close enough" to be a reasonable indication of what would happen when the bonus is clawed-back.