Creating an insulin:carb calculator

8:00 am in Food & diet, Living with diabetes by Tim

The thills and spills of formulae

The thills and spills of formulae

In an idle moment and for a bit of fun – I use the term “fun” advisedly here – I decided to knock up a diabetes spreadsheet.

I thought it would be interesting (again the term “interesting” is relative here) to log my insulin doses, carbohydrate intake and resultant blood glucose. By comparing the carb to insulin ratio – over, say, a 14 day period – to the resulting BG target-range hit-rate, I could objectively calculate my ideal ratio at different times of day. From this data I could then create a personalised insulin calculator. I could type in the time of day, my proposed carb intake and from that calculate the correct dose of insulin to stick in – all based on the data I collected earlier.

I don’t need to tell you, it was a dull, rainy weekend.

I know that the minute I publish this, someone will say in the comments below “Ah yes, the ‘Carbotron-XP’ software can already do this for you”. However, despite that inevitability, it was an interesting exercise to work out the formulas, etc., by myself.

This was mainly because I quickly realised how insanely complex it is to note all the relevant factors and come up with objective calculations. Measuring and logging my BG, carb and insulin intake before and after meals is pretty straightforward (if incredibly, incredibly tedious) but then it gets more complex.

What if my BG is high before my breakfast banquet and I stick in a correcting dose – in addition to an amount to cover the roast pheasant and flagon of port I have each morning? If I simply divide the number of carbs by the amount of insulin I’ve put in then that screws up my carb:insulin ratio calculation, as it doesn’t take account of the correction. So corrections have to be recorded separately.

To keep things simple, I’ve also divided the day into eight separate blocks – that is before and after meals and two night-time blocks. But what if I have a mid-morning snack which I might cover with a unit or two? If that’s not recorded then, it too, will screw up my calculations. I’ve therefore had to cheat and lump my elevenses in with my breakfast. While this is probably near enough, it starts to add a margin of error into the equations.

More errors inevitably creep in as the spreadsheet doesn’t take account glycaemic index, exercise, stress, phase of the moon, tide times and everything else that affects my blood glucose.

And so, in the end, my highly objective exercise results in a rough guide to carb:insulin and requires quite a lot of finger-in-the-air guestimating to get it to work. If carefully recorded data and the massive computing power of Microsoft Excel can’t come up with a useful guide to diabetes, then it’s no wonder I manage to completely cock-up my doses from time to time. I suppose what is more interesting is that – apparently against the odds – I manage to get it right quite so often. Go me!

Share this with your chums:
  • Print
  • Facebook
  • Google Bookmarks
  • Add to favorites
  • email

Tweet This Post

Related posts:

  1. All restaurants should be made to publish carb counts
  2. Circadian Rhythms
  3. Venice, city of carbs
  4. Diabetes formula
  5. Storing insulin