Hacking the QTc

Long QT, torsade de pointes

The QT interval—a measure of the duration of the overlapping action potentials from two billion ventricular muscle cells—has fascinated physiologists since the dawn of electocardiography.  Too long or too short, it can be a harbinger of ventricular arrhythmias and sudden death. Sensitive to electrolytes, drugs, and autonomic tone, susceptible to congenital ionic channel mutations, difficult to measure (which lead? where does it end? what about the U wave?), and markedly varying with heart rate—the QT interval is clinically important and, at the same time, elusive.  To distill the essence of the QT interval and separate out the volatile heart rate dependent components,  the corrected QT interval (QTc) was devised.   Succumbing like everything else to automation, the QTc has become just another number printed in the upper left corner of a digital electrocardiogram, along with the PR and QRS intervals, the QRS axis, and the patient ID. Lulled into complacency by its automatic generation via algorithm (despite the lurking disquiet engendered by the knowledge that the very same algorithm occasionally reads normal sinus rhythm during complete heart block), few bother to ask: Where does that number come from? What formula was used to derive it?  Is the corrected interval actually correct?

For those who care about such questions, the QT can be manually measured and the QTc calculated. Most use the hoary Bazett formula dating from 1920, relating the QT to the square root of the cardiac cycle length. Some are aware of a few other formulas: Fridericia, Hodges, or Framingham. There are many online and native app QTc calculators–in fact my apps EP Mobile and EP Calipers have built-in calculators for all four formulas. There seems to be little need for yet another QTc calculator app.  Nevertheless I have written one, EP QTc, and I should explain how that came about.

Formulas, formulæ

There are more QT corrective or predictive formulas in the medical literature than you might imagine—at least 40.   Rabkin et al. collected 31 of these formulas and worked out a standard nomenclature and classification scheme. Rabkin does not actually give the mathematical equations involved. In fact, nowhere are these formulas collected in a single source.  And what good are formulas if you can’t apply them?  On a whim I thought it would be interesting to write an app that would calculate the QTc using not just one or four formulas, but all the formulas given by Rabkin. The app would also provide details about each formula and statistics and graphs of the results.  I wasn’t sure who would be interested in such an app (probably no one), but at the same time I saw it as a simple project that might make QTc calculating more fun while putting this mass of QT correction literature into perspective. It turns out, it wasn’t such an easy matter.

Paywalls galore

Starting at the beginning, I looked up Bazett’s original article published in 1920. The only online source for the Bazett article is the Wiley Online library.  The site says the article was first published on October 27,  2006.  No, the article is from 1920, and this is a reprint of the original.   According to US copyright law, anything published before 1923 is in the public domain. I’m sorry, but reprinting an article that is in the public domain does not restart the copyright clock.  Nevertheless, the only way to get a digital copy of this historically important article is to pay an extortion fee of $38 to the wily racketeers at Wiley who have managed to kidnap this article and hold it hostage for almost a century.

What was true of Bazett was also true of the vast majority of the articles I was seeking.  The QT correction literature like most science is locked up behind paywalls.  Lacking institutional access and repelled by the idea of shelling out vast quantities of cash for papers many of which were in the public domain, I faced a major obstacle. Fortunately I enlisted some colleagues with digital library access to help liberate these publications, and I eventually managed to get nearly all the primary sources for the different QT formulas.  Beyond these paywalls, there were other lesser hurtles to leap over, but we’ll get to them later.  In the meantime, you may be asking…

What’s wrong with Bazett?

Most every QTc calculator uses the Bazett formula. Why not? It’s simple and can be solved with any device (slide rule or something more advanced perhaps) that does square roots. It was the first QTc formula developed. So why were 30 or more other investigators dissatisfied with Bazett and felt the need to develop their own formulas? What’s wrong with classic Bazett?

Reading the original Bazett article is interesting (though still not worth $38). We travel back to a simpler time when the ECG was relatively new, and the only leads were I, II, and III.  Bazett was interested in the dependence of the duration of mechanical systole on heart rate, and, lo, this particular interval on the ECG, the QT, seemed like a good surrogate to study this. Professor Bazett was able to gather a grand total of 39 healthy subjects, 20 men and 19 women, aged 14 to 53 (though one subject’s age is listed merely as “Boy”) and measure their heart rates and QT intervals.  In some cases individual values were given, in others averages of several values were used. Several  subjects were not his own, but data borrowed from Dr. Thomas Lewis. From this small selection of messy data points Bazett came up with what is still considered the gold standard QTc formula used today:

QTc = QT/√RR.

QTc or QTp?

Well, not exactly. Bazett and most of the early investigators did not create QTc formulas, i.e. formulas intended to give an idealized QT interval independent of heart rate. Bazett and his colleagues were interested in predicting what the QT interval should be at different heart rates. This is the QTp, the predicted QT interval.1 Bazett’s published formula was:

QT = K √RR where K = 0.37 for men and 0.40 for women with units in secs

Similarly the Fridericia formula, also published in 1920 was:

QT = 8.22 ∛RR with units in 0.01 sec

Yes, you read that right. The units are hundreds of seconds. Ugh.

As it turns out one can mathematically convert any QTp formula to a QTc formula, given the assumption that the QTc is independent of heart rate and the QTc equals the QTp at a heart rate of 60. The process is left as an exercise for the reader :).  Later authors took the Bazett, Friedericia and many other QTp formulas and converted them to clinically more useful QTc formulas.

In search of a better Bazett

No one was able to reproduce Bazett’s results. Many authors found that Bazett’s QTc formula tended to overcorrect the measured QT interval at high heart rates, and undercorrect it at low heart rates (e.g. see here). Certainly with such a low N and primitive methodology, Bazett may have mischaracterized the QT vs RR curve. Perhaps the exponent in the formula is not 0.5, or perhaps relating the QT to a power of the RR is not even the right kind of function to use.  The disturbing fact is that each group of investigators who has studied the relationship between the QT interval and heart rate has come up with a different formula.

Linear, power, logarithmic, exponential—oh my!

In reviewing the QT papers, including some studies using 10s of thousands of patients, it is remarkable how inconsistent the findings are with regard to the shape of the QT vs RR curve. Some authors find a straight line, with a linear function underpinning the relationship. Others find curvature at either end of the heart rate spectrum.  The resultant equations are sometimes logarithmic or exponential.

Rabkin uses a classification that I used in the EP QTc app.

ClassificationQTpQTc
linearQT = b + a*RR QTc = QT + a(1-RR)
rationalQT = b + a/RR QTc = QT + a(1/RR - 1)
powerQT = b RR^aQTc = QT/RR^a
logarithmicQT = b + a*ln(RR) QTc = QT - a*ln(RR)
exponentialQT = b + a*e^-RR QTc = QT + a*(e^-RR - 1/e)

(* = multiplication, ^ = raised to the power.  Table modified from Malik et al.)

This table also shows how each QTp formula can be converted to a QTc formula. Any QTp formula can be converted to a QTc formula, so theoretically there are as many QTc formulas as QTp formulas.  Rabkin lists many more QTp formulas than QTc formulas.  Evidently in many cases the conversion has not been considered worth the effort to do.

Typos and unit confusion

Back to the vicissitudes of creating the EP QTc app.  The tale of woe continues with multitudes of typographical errors in the sources and inconsistency of units in the formulas. Typos include mistranscribing formulas in secondary sources (e.g. reading 7 instead of 1 in a tiny exponent), rounding errors, and just plain poor proofreading. I will not mention specific sources, but these types of mistakes seem to be common in the medical literature.  Sure glad we’re paying those publishers all that money for quality control.

As to unit confusion, we already alluded to the use of 0.01 sec as the base unit in the Fridericia formula. Various authors use heart rate as opposed to cycle length in their formulas.  They are inversely related and the use of different terms makes it hard to compare formulas to each other.   Adding to the confusion is that formulas almost invariably use an RR interval measured in seconds, but then sometimes in the same formula require a QT in milliseconds.   Sometimes the units used for the dependent variables aren’t made clear.   Most authors also don’t seem to realize that the results of non-linear QTc formulas aren’t really in units of sec or msec. For example, Bazett QTc units are sec/√sec, i.e. √sec (or worse, msec/√sec).  To be fair, I sidestep this issue in the EP QTc app as well.  To my mind this unit confusion just emphasizes what an artificial thing a QTc is.

Nomenclature

Having obtained sources for all the formulas mentioned in Rabkin (and a few more), I applied Rabkin’s proposed nomenclature. This consists of a 6 letter code for each formula: the first 3 letters QTc or QTp, and the last three based on the first author’s last name. Thus Bazett’s QTc formula is QTcBZT. The Framingham study QTc formula, less well known by its first author (Sagie) is QTcFRM. There are some inconsistencies in the nomenclature which I have tried to correct. For example, Kligfield’s formula is given as QTpKLN in Rabkin, since Kligfield is misspelled as Klingfield. Oh well.

Sex and age

Some formulas differ depending on the sex or age of the subject, or both. The QT interval tends to increase with age and is longer in adult women. So some formulas require entering the age and/or sex. These formulas will simply refuse to give a result if these parameters aren’t present.

A tough question is how to apply QT formulas to subjects that don’t match the study population. I excluded formulas that were derived only from children. All of the study populations are predominantly based on adults, but in a few children were also included. Some studies used men only as subjects.  Is it reasonable to apply a formula derived from data from only men to a woman? In the EP QTc app I avoid such issues and leave it up to the user to deal with this question.

What is normal?

Here is another Pandora’s Box. Just as there are many QTc formulas, there are many papers dealing with establishing the normal QTc. Given syndromes of sudden death related to short QT intervals, both boundaries of normal need to be considered. I have gathered these papers together along with their QT interval cutoffs. These are often sex-specific, and sometimes gradations of abnormality are assigned, e.g. borderline and abnormal, or mildly, moderately, or severely prolonged. In the app the user can select from among these published criteria to define whether a result is normal or not.  In practical clinical use, the QTc interval is only one component in the risk scales needed to establish the diagnosis of long or short QT syndrome.

What about QTp intervals?

By definition a QTp interval is normal. Rabkin proposes that, since QTp formulas were derived from multiple different populations, QT intervals outside the range of all defined QTp intervals may be considered abnormal. I have implemented this algorithm in the EP QTc app. One objection to this approach is that QTp formulas (with some exceptions) give mean values for normal QT intervals.  Thus one would expect the range of normal QT intervals to be somewhat larger than the range of all possible QTp intervals. One should probably take this into account when interpreting the QT vs QTp interval statistics and graphs.

QT library and EP QTc app

All of the data on QTc and QTp formulas have been incorporated into a QTc library. This library is open source and free to use. It can be used with any iOS or macOS project. The library includes functions that make it easy to calculate the QTc or QTp by any formula, using any input (RR or heart rate, sec or msec). In addition information such as references and DOI links, notes, equations, and study populations can be easily assessed. For technical use of the QTc library see the README.

The EP QTc app was originally intended just as a demo app for the QTc library, but it has numerous features making it useful in its own right. Use it to calculate the QTc and QTp using 33 formulas. Graph and do statistics on the results. Copy the results to spreadsheet programs. Options to change precision, sort the results, use different QTc cutoffs from the literature and others are all available.  The source code is on GitHub, and I hope the app will soon be on the Apple App Store.

Finale

I’m not sure who will use the EP QTc app. Maybe no one. It is certainly overkill. If you just want an occasional Bazett QTc it may not be worth it. If you want to explore this minor corner of the literature further, it may interest you. At worst, you can at least impress your friends when you tell them the QTpMRR for your patient.

Some screenshots

Main calculator screen
QTc graph
Statistics screen
QTc results screen
Details screen
QTc limits screen
QT, QTp vs heart rate
Preferences screen
QTp graph

  1. Not to be confused with the same abbreviation used by some modern authors to indicate the QT measured to the peak of the T wave.

By mannd

I am a retired cardiac electrophysiologist who has worked both in private practice in Louisville, Kentucky and as a Professor of Medicine at the University of Colorado in Denver. I am interested not only in medicine, but also in computer programming, music, science fiction, fantasy, 30s pulp literature, and a whole lot more.

6 comments

  1. If it is already complicated in humans, imagine in animals! My problem is to correct QT interval in cats! Their heart rate are around 200 bpm (160-240), and QT varies betwen 0,12 to 0,18 s!

  2. How do i game my qtcf? Meaning its 445 . I would like to get it to420 . All options I am interested in such as natural like foods excercise weight loss and drugs. 626 417 2175 thank you.

    1. At this time I am not planning an Android version. There are reasons for this decision, which I may outline in a future blog post.

Leave a Reply to Richard YoshidaCancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.