Abstract
Objectives:
To: (1) update and refine the predictive abilities of original p-THYROSIM, a uniquely personalized simulation tool that mathematically mimics the thyroid hormone regulation system in humans, to optimize replacement LT4 and LT4+LT3 dosing for hypothyroid patients, based on individual hormone levels, heights (H), weights (W) and sex. Refinements include dependence on H and W separately, rather than composite BMI=W/H2. And to: (2) present a new and user-friendly software tool, an iOS p-THYROSIM app for the iPhone and iPad, to accomplish these goals, as well as a Python version for longer term disease progression simulations.
Methods:
Original p-THYROSIM was refined and updated, first by refitting male and female data for establishing blood volume Vb as a function of Ws and Hs of males and females separately. A superfluous parameter was also removed and FT4 and FT3 output plotting were slightly adjusted to align them with current assay ranges. We also developed two software packages for simulating the model: (1) a 100-day iOS implementation for the iPhone and iPad using Apple developer tools; and (2) a 1000-day version in Python, with time units converted from hours to days to render it more practical for research use with clinical diseases that evolve over months and years.
Results:
The iOS app was implemented, exercised and tested in several clinical applications. Most notably, simulation results are shown and compared for hemi-thyroidectomy and for optimal dosing for mono- and combination hormone replacement therapies. With the Python version, graphic hormone responses for 240 days of evolving mono- and combination replacement therapies were illustrated for a simulated Hashimoto’s disease patient. With both versions, simulated combination therapy was shown to be more effective in achieving normal range FT4, FT3 and TSH concentrations in plasma.
Conclusions:
p-THYROSIM can predictively provide accurate mono- and combination LT4+LT3 replacement hormone therapies for male and female hypothyroid patients, personalized with their Hs and Ws. Where combination therapy is warranted, our results predict that not much LT3 (typically 5 – 7.5 ug) is needed in addition to LT4 to restore euthyroid levels, with larger LT3 doses rarely needed, suggesting opportunities for further research exploring safe and effective combination therapy with lower T3 doses and slow-releasing T3 formulations.
Introduction
A personalized simulation tool p-THYROSIM that mathematically mimics the thyroid hormone regulation system in humans (Figure 1) was developed in (1) and applied to better optimize replacement LT4 and LT4+LT3 dosing for hypothyroid patients, based on individual hormone levels, BMIs and sex. Compared with 3 other dosing methods, the accuracy of p-THYROSIM optimized dosages for LT4 monotherapy was better overall (53 vs. 44, 43 and 38%) including for extreme BMI patients (63 vs.~51% low BMI, 48 vs.~36 & 22 for high BMI). Optimal dosing for combination LT4+LT3 therapy and unmeasured residual thyroid functions (RTFs) were predictively computed with p-THYROSIM for males and females in low, normal and high BMI ranges, yielding daily T3 doses of 5 to 7.5 μg T3 combined with 62.5–100 μg LT4 for women or 75–125 μg LT4 for men. The LT3 in these dosages were in line with that recommended by thyroid organizations in the United States and Europe (20:1 to 13:1 ratios) (2).
Figure 1

A physio-anatomic rendition of thyroid hormone (T4 and T3) productions, exchanges and regulation by pituitary hormone TSH and hypothalamic hormone TRH in humans. 100% of T4 and ~20% of T3 is produced and secreted by the thyroid gland, the remaining 80% of T3 is produced by enzymatic deiodination from T4 in every tissue, dynamically exchanging in rapidly (Fast tissues) and slowly (Slow tissues) with different tissue groups, as shown in the figure (3).
In subsequent research and clinical application of p-THYROSIM we found that in simulations of extremely low and high BMI patients, the original model displayed a systematic misfit in simulated serum FT3 concentrations. Lean individuals tended to appear with higher-than-expected FT3 while obese individuals showed lower-than-expected FT3. This suggested a size/composition and sex-related mapping issue, which further analysis traced the problem to an error in fitting blood volume Vb data in (1) – incorrectly fitted to composite male-female data, instead of separately to male and female data. We refitted this data, revised the model accordingly, and updated a few other model issues, all as described below. These changes also included our use of H and W independently in our new model, not as a composite BMI.
We fully implemented the updated model in a new iOS app for the iPhone and iPad, as described below, and applied it to optimal monotherapy and combination therapy replacement hormone dosing in our example results.
Methods and results
Refitting of blood volume data separately for males and females
Height H and weight W, primary anthropometric parameters depicting size differences among individuals, are routinely measured at patient visits. Blood volumes Vb are complex functions of H and W, rising and falling with increases and decreases in body size. To incorporate these parameters into the original p-THYROSIM model (1), we developed a regression equation for blood volumeVb from an ideal weight formula fitted to a published and composite dataset containing 80 men and 80 women of different body compositions, Hs (in meters) and body weights (BWs (in kg), ranging from underweight to obese (4). Vb was expressed as a function of % deviation ΔiBW from ideal weight relative to ideal weight, with iBW(H, sex) the ideal weight of a patient expressed as quadratic functions of H for each sex, all fitted to data in Figures 1 and 3 of reference (4)). Plasma volume VP then was computed as VP=Vb(1 – HEM), with hematocrit HEM approximated as 0.4 for female patients and 0.45 for male patients.
Figure 3 in reference (1) was misfitted, as it did not capture the sex differences in blood volumes. These regressions were redone for female and male data separately, fitting Vb for females from only female data (R2 = 0.79) and Vb for males (R2 = 0.76) from only male data. The results are given in Figure 2.
Figure 2

Male and female data from (4) refitted separately for males and for females. The abscissa deviation from ideal body weight Δiw (abbreviated from ΔiBW) incorporates sex-height H relationships as well as W for fitting Vb to the published data.
MALE FITTED FUNCTION:
FEMALE FITTED FUNCTION:
We also simplified the model by eliminating unnecessary allometric scaling in the formula for T3 degradation (k05) in the rapidly exchanging T3 compartment of the model but retained its small dependence on sex differences (about 5% higher in males). Together, these two model modifications eliminated the aberrational simulation response results at extreme BMI.
We also slightly adjusted the FT4 and FT3 output plotting functions to align them with current assay ranges in the UCLA Clinical Laboratory database, the primary source of our human data for modeling and applications of p-THYROSIM. Example results are illustrated below in the software iOS “app” development section below.
iOS implementation of the model for the iPhone and iPad
Original (non-personalized) THYROSIM was developed as a web application (http://www.biocyb1.cs.ucla.edu/thyrosim/cgi-bin/Thyrosim.cgi) and also as an iOS version available from the Apple Store (search for: Thyrosim). Our first implementation of p-THYROSIM for distribution – described below, is an iOS version, with units in hours, for simulations up to 100 days (Figure 3). The code is here: tinyurl.com/pthyrosim. Figure 3 also includes a picture of the dosing input page, with instructions and several input options.
Figure 3

p-THYROSIM Introduction and Dosing Input choice pages.
The p-THYROSIM iOS app was built using the Swift language (5) and SwiftUI framework (6), creating a native mobile application that allows users (e.g. healthcare professionals) to simulate thyroid hormone treatments and predict patient responses to these treatments. The app serves as a clinical decision support tool, enabling users to model different dosing strategies (as in Figure 3RIGHT) for patients with thyroid disorders before implementing actual treatments.
Users input thyroid secretion rate and intestinal absorption rate changes from default values, as well as patient characteristics (height, weight and gender) on the (Input icon) page of the app (Figure 4LEFT). Simulation results for euthyroid and hemi-thyroidectomy conditions for this male are shown in Figure 4 on the RIGHT.
Figure 4

Input values (LEFT) and simulation (RIGHT) hormone response output pages of p-THYROSIM for a 70 kg 170 cm male under simulated hemi-thyroidectomy conditions (secretion rates 50%) with no replacement therapy, superimposed on prior euthyroid responses (secretion rates 100%) over 30 days.
Various oral dosing scenarios (Figure 3RIGHT) to visualize how hormone levels will change over time in response to these potential treatments are entered on the next few pages – the primary applications of the app, by clicking icons at the bottom of the page, as shown in Figures 3 and 4. Simulation results for other oral input choices are given graphically on subsequent pages (Figures 5, 6). Up to four dosing strategies can be visualized simultaneously in a single graph (3 are shown in Figure 6).
Figure 5

Monotherapy (75 μg LT4, LEFT) vs. combination therapy (50 ug LT4 + 7.5 μg LT3, RIGHT) in a 70 kg 170 cm male with 50% residual thyroid function (RTF=%secretion rates) over 30 days of treatment, with the goal of achieving mid-range hormone levels.
Figure 6

Illustration of 3 runs superimposed. Simulated 200 lb 65 inch female with 10% RTF receiving 0 (constant mean RED curves), 112.5 μg (TOP LT4 purple) LT4 only daily, and 100 μg LT4 once a day+5 ug LT3 twice daily (centered FT4 and high frequency FT3 peaks, BLUE) for 45 days. TSH curves with dosing are overlapped (BLUE and PURPLE), constant mean (RED) without dosing.
The app translates a complex mathematical model into Swift, maintaining the same 19-compartment differential equation system that describes thyroid hormone dynamics (1). The core mathematical engine uses a 5th-order Runge-Kutta numerical solver that approximates the original Rodas5 solver from the scientific implementation. This solver integrates the complex physiological equations describing how FT4 (or TT4), FT3 (or TT3) and TSH hormones move through different body compartments, including plasma, various organs, under the control of pituitary-brain negative feedback mechanisms. Simulation output shows plasma hormone concentrations, the measurable compartments (as on the RIGHT in Figure 4).
The mathematical model runs behind the scenes, solving the differential equations with high precision to provide accurate predictions of hormone concentration changes over days or weeks. As one example in Figure 5, clinicians can optimize treatment dosing regimens for individual patients with the app. This figure provided a comparative example of LT4 monotherapy versus LT4+LT3 combination therapy in a single patient, each with the goal of achieving mid-range normal hormone levels. Figure 5 results are shown in 2 graphs, for comparative clarity.
Model and code adjustments for a longer-term (1000-DAY) Version of p-THYROSIM
Original p-THYROSIM was developed for simulations up to 100 days. To render it more practical for use with clinical diseases that evolve over months and years, we converted time units in the model from hours to days. To accomplish this, all fractional rate constants with the units per hour were converted to units of per day, by dividing them by 24. All parameters and variables with units of time in hours were converted to time in days by multiplying them by 24. This resulted in model simulations running about 24 times faster, and likely with less numerical errors. Python code (7, 8) for the 1000-day version is available at our Github website: tinyurl.com/pthyrosim.
These temporal modifications allow for more realistic simulation of chronic thyroid conditions and their management, accommodating disease progression and therapeutic interventions over timeframes relevant to clinical practice. Furthermore, our revised parameterization ensures consistency with long-term clinical follow-up data, enhancing both the utility and reliability of p-THYROSIM for extended predictive modeling. Example plots from the 1000 day code are given in Figure 7 for a simulated Hashimoto’s disease patient.
Figure 7

Simulation of 240 days of treatment with both monotherapy and combination replacement therapy in a simulated 54 kg 1.7m female Hashimoto’s patient. This hypothetical patient initially has TSH > 40 mU/L, FT4 = 5 ng/L and FT3 < 2 ng/L. She is started on 150 μg LT4 daily for 60 days, reduced to 75 μg LT4 daily for 90 days and finally given 100 μg LT4 + 7.5 μg LT3 daily for 90 days.
The simulated 54 kg 1.7m female patient initially has TSH > 40 mU/L, FT4 = 5 ng/L and FT3 < 2 ng/L. She is started on 150 μg LT4 daily for ~ 65 days, reduced to 75 μg LT4 daily for ~ 85 days and finally given 100 μg LT4 + 7.5 μg LT3 daily for 90 days. Model-predicted plasma hormone responses to these treatments are clearly shown in Figure 7. The first 65 day prescription succeeded in normalizing TSH and bringing FT3 into the normal range, but FT4 overshot the normal range substantially. The second 85 day treatment normalized FT4 and TSH but failed to bring FT3 into the normal range. The combination therapy (last 90 days) succeeded in normalizing all three hormones.
Discussion
The primary goal of this work was to update and refine the predictive abilities of original p-THYROSIM (1), a uniquely personalized simulation tool that mathematically mimics the thyroid hormone regulation system in humans (Figure 1). The original was developed to optimize replacement LT4 and LT4+LT3 dosing for hypothyroid patients, based on individual hormone levels, BMIs and gender. We followed the same original goals but use weight (W) and height (H) data independently – rather than BMI computed from W and H, in addition to sex, revised first as in Figure 2. We also made a few other key changes to the model that have rendered it more predictively accurate, eliminating an incorrect assumption about T3 degradation, and slightly tweaking the ranges of FT4 and FT3 to adjust for data and assay variability from different sources over different time periods used in model building.
Various effects of age, sex and anthropometric body size measurements on thyroid regulation or treatment have been reported in several publications in the recent past, e.g (9–11). But none except (1), to our knowledge, has formulated these measurements into a predictive model for simulating dynamic responses to anthropometric differences. The original p-THYROSIM (1) and our updated model described herein address this quantitative deficiency directly and are unique in this regard.
We have developed a very user-friendly iOS implementation of our updated model for the iPhone and iPad, rendering it maximally useful to the clinical community overall and to endocrinologists especially. As example clinical applications of the app, Figures 4-6 illustrate the various pages of the app for user input and output hormone response results to: hemi-thyroidectomy (Figure 4); optimal monotherapy vs. combination therapy (Figure 5); and the ability to test up to 4 different dosing or testing strategies and represent them simultaneously in a single comparative plot (3 superimposed in Figure 6). In Figure 5, it is apparent that 112.5 μg of LT4 in monotherapy (or even 125 μg LT4, not shown) do not alter FT3 levels very much, and are not as effective as adding LT3 in a combination dose of 100 μg LT4 + 10 (=2 x 5) μg LT3, which achieves mid-range for all hormones, consistent with regulated and safe use of LT3 in replacement therapy (12). The simulated female patient with more severe disease in Figure 6 also shows combination dosing achieving better plasma hormone normalizations, while illustrating the ability of the app to superimpose multiple sets of responses.
Figure 7 illustrates a second (Python) program version of the model, with time in days instead hours, to graphically represent the longer time-course of disease progression and treatment. This simulation illustrates hormone level predictions to potential treatments, in this case with both combination LT4+LT3 and LT4-only daily dosing, the former clearly more effective in normalizing all three hormone plasma levels. The Python code is also available at our Github: tinyurl.com/pthyrosim.
The new iOS version will be available from the Apple Store in the near future. All code is freely available at our Github (tinyurl.com/pthyrosim) for anyone to make their own application for the model over any time period. We are currently building another iOS app for the model in days (spanning1000 days) and an internet version of p-THYROSIM, for greater access to the app.
Statements
Data availability statement
The raw data supporting the conclusions of this article will be made available by the authors, without undue reservation.
Author contributions
JD: Writing – original draft, Project administration, Methodology, Visualization, Resources, Data curation, Validation, Conceptualization, Funding acquisition, Supervision, Writing – review & editing, Formal analysis. KR: Formal analysis, Software, Visualization, Writing – review & editing, Validation, Data curation, Methodology. KG: Validation, Data curation, Methodology, Conceptualization, Writing – review & editing, Software, Resources, Visualization, Formal analysis. RC: Validation, Project administration, Formal analysis, Data curation, Visualization, Methodology, Writing – review & editing, Conceptualization, Software. SN: Writing – review & editing, Software.
Funding
The author(s) declared that financial support was not received for this work and/or its publication.
Acknowledgments
The authors sincerely appreciate the 11th-hour (and continuing) effort made by UCLA Computer Science undergraduate Ashwin Joshi for updates to our iOS software app, rendering it even more user-friendly.
Conflict of interest
The authors declared that this work was conducted in the absence of any commercial or financial relationships that could be construed as a potential conflict of interest.
Generative AI statement
The author(s) declare that Generative AI was not used in the creation of this manuscript.
Any alternative text (alt text) provided alongside figures in this article has been generated by Frontiers with the support of artificial intelligence and reasonable efforts have been made to ensure accuracy, including review by the authors wherever possible. If you identify any issues, please contact us.
Publisher’s note
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article, or claim that may be made by its manufacturer, is not guaranteed or endorsed by the publisher.
References
1
Cruz-Loya M Chu BB Jonklaas J Schneider DF DiStefano J . Optimized replacement T4 and T4+T3 dosing in male and female hypothyroid patients with different BMIs using a personalized mechanistic model of thyroid hormone regulation dynamics. Front Endocrinol. (2022) 13:1–13. doi: 10.3389/fendo.2022.888429
2
Brigante G . Randomized double-blind placebo-controlled trial on levothyroxine and liothyronine combination therapy in totally thyroidectomized subjects: the LEVOLIO study. Eur J Endocrinol. (2024) 190:12–22. doi: 10.1093/ejendo/lvad172
3
Eisenberg M Santini F Marsili A Pinchera A DiStefano JJ . TSH regulation dynamics in central and extreme primary hypothyroidism. Thyroid. (2010) 20:1215–28. doi: 10.1089/thy.2009.0349
4
Feldschuh J Enson Y . Prediction of the normal blood volume. Relation of blood volume to body habitus. Circulation. (1977) 56:605–12. doi: 10.1161/01.CIR.56.4.605
5
Apple . The swift programming language (2014). Cupertino (CA: Apple Inc. Available online at: https://docs.swift.org/swift-book/ (Accessed Oct 26, 2025).
6
Apple . SwiftUI (2019). Cupertino (CA: Apple Inc. Available online at: https://developer.apple.com/documentation/swiftui (Accessed October 26, 2025).
7
Virtanen P Gommers R Oliphant T Haberland M Reddy T Cournapeau D et al . SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods. (2020) 17:1–12. doi: 10.1038/s41592-019-0686-2
8
Hindmarsh AC . ODEPACK, a Systematized Collection of ODE Solvers in Scientific Computing, SteplemanRSet al (eds.), North-Holland, Amsterdam (1983) .(Vol. 1 IMACS Transactions on Scientific Computation), pp. 55–64.
9
Bjergved L Jørgensen T Perrild H Laurberg P Krejbjerg A Ovesen L et al . Thyroid function and body weight: A community-based longitudinal study. PloS One. (2014) 9:e93515. doi: 10.1371/journal.pone.0093515
10
Song Q Chen X Su Y Xie Z Wang S Cui B . Age and gender specific thyroid hormones and their relationships with body mass index in a large Chinese population. Int J Endocrinol Metab. (2019) 17:e66450. doi: 10.5812/ijem.66450
11
Devdhar M Drooger R Pehlivanova M Singh G Jonklaas J . Levothyroxine replacement doses are affected by gender and weight, but not age. Thyroid®. (2011) 21:821–7. doi: 10.1089/thy.2011.0029
12
Bahl S Taylor PN Premawardhana LD Stedman M Heald A Dayan CM et al . Risk of death and adverse effects in patients on liothyronine: A multisource systematic review and meta-analysis. J Clin Endocrinol Metab. (2025) 110:3278–88. doi: 10.1210/clinem/dgaf449
Summary
Keywords
math model, simulation model, residual thyroid function, optimal dosing, personalized medicine, monotherapy, combination hormone replacement therapy
Citation
DiStefano J III, Reid K, Ghabra K, Chen R and Narayanan SS (2026) Personalized p-THYROSIM model for thyroid hormone dynamics, hypothyroidism treatment & implementation in an iOS version for wide distribution. Front. Endocrinol. 16:1735282. doi: 10.3389/fendo.2025.1735282
Received
29 October 2025
Revised
29 October 2025
Accepted
02 December 2025
Published
09 January 2026
Volume
16 - 2025
Edited by
Jacqueline Jonklaas, Georgetown University, United States
Reviewed by
Stephen Fitzgerald, Royal Adelaide Hospital, Australia
Nelly Margarita Macías-Gómez, Centro Universitario del Sur, Mexico
Updates
Copyright
© 2026 DiStefano, Reid, Ghabra, Chen and Narayanan.
This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.
*Correspondence: Joseph DiStefano III, joed@cs.ucla.edu
Disclaimer
All claims expressed in this article are solely those of the authors and do not necessarily represent those of their affiliated organizations, or those of the publisher, the editors and the reviewers. Any product that may be evaluated in this article or claim that may be made by its manufacturer is not guaranteed or endorsed by the publisher.