I rebuilt Refracto (the discontinued iOS refractometer app) as a free web app

Hey everyone! Homebrewer here. If you used Refracto on iOS, you know it was a great refractometer calculator for tracking fermentation — until it disappeared from the App Store. Since the original code was open source (BSD-3, credit to Michael Schmidt), I rebuilt it for the web with the original correction formulas (Bonham, Novotný, Terrill) and added some things I always wanted:

  • Recipes with BJCP style targets (OG/FG/ABV ranges shown as you log readings)
  • Fermentation log with a gravity + temperature chart (Brewfather-style)
  • Manual entries for past readings, wort correction factor, °Brix ⇄ SG
  • Data backup/restore (everything stays on your device — no cloud, no account)

It works offline after the first visit: open the link on your phone and use “Add to Home Screen” — it behaves like a native app from then on.

:beer_mug: refracto.netlify.app

Free, no ads, no tracking. I don’t make anything from this — I built it because I needed it myself. If you spot a mistake or have suggestions, let me know and I’ll fix it!

4 Likes

Neat tool. I put it on my phone.

Enhancement suggestions:

My Wort Correction Factor is actually less than 1.000, it is 0.994. Could you allow values less than 1.000? If I could at least set it to 0.995, it will be more accurate based on my experience.

I would also be interested in a hybrid method which automatically switches between methods based on Standard (Bonham) calculated Final Gravity, such that when Standard is greater than 1.015 the default automatically switches to Novotny Linear, and when Standard is less than 1.013 the default automatically switches to Terrill Cubic. The reason for this is based on deep analysis of my own data set, which shows Standard (Bonham) to be most accurate across the board, followed by Novotny (either Cubic or Linear, with Linear having only a very slight edge over Cubic) when FG has an estimated or calculated FG greater than a pivot point of about 1.014, and with Terrill (either Cubic or Linear, with Cubic having a slight edge) when FG has an estimated FG less than the same pivot point. In any case, I find it is never unwise to trust the old Standard formula – Bonham’s old formula stands the test of time. None of these is perfect when compared with a trusty floating hydrometer; however, when used properly with an accurate WCF and calibrated instruments, most results calculated from refractometer readings can be accurate within 0.002 of a hydrometer. YMMV

Good tool. Cheers.

1 Like

Hey Dave. Thank you very much for the suggestions. They are truly valuable. I will work on this.

1 Like

Thanks you again for this feedback — data-driven suggestions like yours are exactly what makes a tool better. Both are now implemented and live:

WCF below 1.000 — the slider now goes from 0.950 to 1.060 in 0.001 steps, so your 0.994 can be set exactly.

Hybrid method — there’s a new formula option called “Auto (hybrid)” that works just as you described: Standard (Bonham) estimates the FG and picks the method — above 1.015 it switches to Novotný Linear, below 1.013 to Terrill Cubic, and in the pivot zone (1.013–1.015) it stays with Bonham itself. I liked that your rule keeps Bonham as the backbone — as you said, the old formula stands the test of time, so it felt right to make it the decider.

The app credits the rule to “community data analysis” in the hint text. If you get a chance to run the Auto mode against your dataset and hydrometer readings, I’d love to hear how close it lands — refining those pivot points with real data would be a great next step.

Thanks again — feedback like this is what keeps the tool improving!

1 Like

I just ran an absolute-value study on how close each method comes to an actual hydrometer. Here is a table and a graph showing the results. The average absolute-value difference is best for the Auto method (I am calling it Taylor-Vander for now), with average discrepancy of 0.0009 specific gravity units, followed by the old Bonham formula with 0.0011, then Novotny at 0.0012, and finally Terrill at 0.0020. This shows that the hybrid method might be just a tiny hair superior to old Bonham. Remarkable that Bonham had things so very well figured out so many years ago. This includes only my own dataset. Kjell Jorner @kjorner I know has fiddled with similar analyses using my own dataset plus Terrill’s, which shows similar average discrepancies.

So, what does this all mean!? It means that WHEN DONE RIGHT USING CALIBRATED EQUIPMENT AND METHODS, your refractometer can give you a good estimate of specific gravity within as low as 0.001 to 0.002 specific gravity unitson average. The correlations are less stable for final gravities greater than say 1.020, however, for anything else these correlations work pretty darn well.

Old Cubic New Cubic New Linear Taylor/Vander Petr Novotny PN Linear
Absolute Values of Discrepancies
0.00012 0.00078 0.00244 0.00082 0.00089 0.00079
0.00241 0.00651 0.00289 0.00354 0.00469 0.00424
0.00080 0.00261 0.00232 0.00002 0.00055 0.00068
0.00166 0.00131 0.00207 0.00018 0.00076 0.00088
0.00067 0.00400 0.00443 0.00001 0.00058 0.00069
0.00083 0.00114 0.00186 0.00013 0.00107 0.00110
0.00161 0.00145 0.00314 0.00075 0.00059 0.00078
0.00080 0.00095 0.00149 0.00010 0.00089 0.00094
0.00099 0.00100 0.00188 0.00029 0.00139 0.00141
0.00046 0.00269 0.00253 0.00141 0.00085 0.00071
0.00069 0.00139 0.00076 0.00069 0.00057 0.00054
0.00071 0.00220 0.00176 0.00150 0.00017 0.00014
0.00013 0.00189 0.00207 0.00130 0.00073 0.00060
0.00162 0.00027 0.00021 0.00097 0.00186 0.00181
0.00234 0.00353 0.00314 0.00237 0.00167 0.00167
0.00236 0.00020 0.00004 0.00050 0.00292 0.00292
0.00012 0.00133 0.00101 0.00063 0.00076 0.00071
0.0011 0.0020 0.0020 0.0009 0.0012 0.0012
Averages
1 Like

Dave, this is fantastic work — thank you for running your dataset through it! Seeing the hybrid land at 0.0009 average against the hydrometer, edging out even Bonham, is very satisfying. And I agree — the most remarkable takeaway is how well Bonham holds up after all these years.

I’m honored by the “Taylor/Vander” name — I’d be happy to adopt it in the app so the method and its origin are properly credited.

Your point about instability above ~1.020 is well taken: I’ll add a note in the app suggesting hydrometer confirmation whenever the calculated FG comes out above 1.020. Keeps expectations honest.

Hat tip to @kjorner’s analyses too. If the pivot points (1.013/1.015) ever deserve tuning based on a merged dataset, I’m all ears — the app evolves with the data. :clinking_beer_mugs:

1 Like

Bonham, Gossett, Sean Terrill, Petr Novotny, Thomas Ascher, and Kjell Jorner all deserve the utmost credit for all their work, and are all more knowledgeable than I am on their particular methods and the science and math behind it all. I cannot accept much credit as I am more like a citizen scientist that has just been trying to compare their methods to see what works best in different scenarios. The only original idea I’ve come up with (several years ago) is that of an apparent pivot point at 1.014. This concept was discussed with Mr. Terrill (was username “a10t2”, now says “[deleted]”) in 2019 at: click here. We agreed at the time that this was worthy of further exploration. Here is another cool reference from Thomas Ascher which discusses the pivot point of 1.014 without credit to me.

1 Like

Cool work @vanderahii! I did a lot of work on refractometer formulas about a year ago but my professional work got in the way and I haven’t had the time to write it up yet. In summary, here is what I learned regarding the traditional methods:

  • Bonham’s correction actually goes back a long way to formulas by Berglund, Emlington, and

    Rassmussen. He just adapted these equations, but the original data and the corresponding equations are from the 1930s. Beer has apparently not changed much.

  • Terrill misunderstood the Bonham equations, you can find the comment of Gossett on his website (see second to last comment from the end). What Terrill did is to then fit new equations to crowdsourced data. As this data is biased towards lower strength beers, he was basically overfitting on this part of the curve. That leads to problems at higher wort strengths.

  • Novotny’s equations are based on data from the 1970s in the Czech republic. The data is good, but the fitting is not. If I remember correctly, they make the same mistake as Terrill (the data can be refit to yield a better equation). The data also lacks higher-strength worts.

  • The so-called wort correction factor tries to compensate for the differences between the two sugars density measurement methods. It depends on the composition of the wort (already Siebel did this work trying to add different component to maltodextrin solutions to see how the hydrometer and refractometer behaved), and should not be a constant of your hydrometer or refractometer (unless they are poorly calibrated). It is not evident that the hydrometer would be better. You could just as well define a “hydrometer wort correction factor” that compensates for certain properties of the wort making the hydrometer “off” (protein content for example).

  • If I would just pick one traditional equation, it would probably be Bonhams. It’s sufficiently accurate and is not based on any erroneous processing.

The best approach in my view though is that taken by Jim Gossett. His philosophy was that the refractometer and hydrometer are two equally valid methods for assessing the concentration of sugar in the wort. The hydrometer does this by measuring the density of the solution, while the refractometer measures the bending of light. When sugar is turned into alcohol, the instruments respond in opposite directions as the two methods have different response factor to alcohol. That the hydrometer is not intrinsically better than the refractometer is quite evident from the use of “apparent attenuation” for example. The best metric for a certain formula is not if it reproduces a hydrometer value, but if it can be used to calculate the alcohol of the final beer (you need data that measures this sufficiently well).

You can work out the response factors from standard tables in scientific and technical handbooks where the density/refractive index is given as a function of sugar and alcohol concentration. Gossett actually did his own measurements for this, but you can just use the tables. You need to make some corrections for (a) temperature and (b) mixing of the two components at the same time in water (a ternary mixture). This has been done by Hackbarth (you can read about it here) for the density, and it is possible to do the same thing for the refractive index with some simpler methods. This approach gives the most accurate results based on my benchmarking (on data from @dmtaylor, Gossett and other sources), but requires iterative root finding, which is not possible to do by hand but trivial in an app and should in my view be standard these days. When I get the time, I will write it up. On the other hand, if you can tolerate a few decimals of error, you probably don’t have to worry about this and can happily use for example Bonham’s formula :wink:

1 Like

Kjell, thank you so much for taking the time to write all of that out — it’s a genuinely fascinating read, and I really appreciate the depth you brought to the thread. I agree with your points.

As a homebrewer, I’ll admit those small differences between the formulas don’t really change my results in the end — but we’re always chasing more accuracy anyway, aren’t we? :grinning_face_with_smiling_eyes: What matters most to me in practice is having reliable measurements to follow my fermentation ramps and stay on top of what the beer is doing, and that’s exactly what the app is built around.

Your study sounds really interesting, and I’d love to see it come together whenever your work allows. If it’s ever useful to have someone to test it or run the data through the app, I’m glad to help. Count me in.

Thanks again — this has been a great thread. :clinking_beer_mugs:

The app looks really cool. Hopefully I can create something useful over the next year or so, and would be great if it could then be incorporated into the app! For tracking fermentation ramps, I would rather use a Tilt, Rapt pill or similar. Very convenient and you don’t need to take any samples. You can then use the refractometer to take initial and final reading without wasting any precious beer, and no samples needed during fermentation either.