Accelerated Failure Time (AFT) Calculator | Free Survival Analysis Tool

Accelerated Failure Time (AFT) Calculator | Free Survival Analysis Tool
STATS UNLOCK · SURVIVAL MODELS

Accelerated Failure Time (AFT) Calculator

A complete, free, single-page calculator for the Accelerated Failure Time survival model. Compare groups using Weibull, log-normal, or log-logistic AFT — with time ratios, censoring, survival curves, and APA-ready reporting.

Survival Model Parametric Weibull / Log-Normal / Log-Logistic Censoring Supported Time Ratios

📥 1 · Data Input

Enter time-to-event values for each group, separated by commas. Optionally append :0 to mark a value as censored (event not observed). Example: 52, 48, 55:0, 61, 47.

Supports .csv, .txt, .xlsx, .xls. Click columns that should each become a cluster — selected columns will be loaded as separate groups.

Enter time-to-event values manually in a small editable grid. Values can be combined across the three columns or left empty.

Run the analysis above to see results, four colorful visualizations, APA-ready reporting templates, interpretation, and downloadable exports.
📐 Technical Notes & Formulas

1. The AFT Model Form

The Accelerated Failure Time model expresses survival time directly as a log-linear function of covariates plus a scaled error term:

log(T_i) = β₀ + β₁·X₁ᵢ + β₂·X₂ᵢ + … + σ·εᵢ

Where:

  • T_i — survival time (time to event) for subject i
  • β_j — regression coefficient on the log-time scale
  • X_j — predictor variable (e.g., group indicator, dose, age)
  • σ — scale parameter governing the spread of log-time residuals
  • εᵢ — standardised residual: extreme value (Weibull), normal (log-normal), or logistic (log-logistic)

2. Time Ratio (Effect Size)

TR = exp(β)

Interpretation: TR is the multiplicative effect of a one-unit increase in the predictor on survival time. TR > 1 ⇒ longer survival; TR < 1 ⇒ shorter survival.

3. Survival Function — by Distribution

Weibull AFT: S(t) = exp[ −(t / λ)^k ] where shape k = 1/σ and scale λ = exp(β₀ + Xβ).

Log-Normal AFT: S(t) = 1 − Φ[(log t − μ) / σ] where μ = β₀ + Xβ.

Log-Logistic AFT: S(t) = 1 / [1 + (t / α)^β'] with α = exp(μ), β' = 1/σ.

4. Likelihood with Right-Censoring

L(θ) = ∏ f(tᵢ; θ)^δᵢ · S(tᵢ; θ)^(1−δᵢ)

δᵢ = 1 if event observed, 0 if right-censored. Parameters are estimated by maximising log L(θ).

5. Hazard Ratio (Weibull only)

HR = exp(−β / σ)

Only Weibull AFT preserves a constant hazard ratio across time, allowing dual interpretation as both AFT and PH.

6. Model Selection

AIC = −2·logL + 2·k
BIC = −2·logL + k·ln(n)

Lower AIC and BIC indicate better fit. Compare distributions on the same dataset to choose Weibull vs log-normal vs log-logistic.

🧪 When to Use the AFT Model

Overview

Use the Accelerated Failure Time model whenever the research question is "by how much does this factor multiply or divide event time?" The AFT framework gives a direct, interpretable answer in time units — unlike the Cox proportional hazards model which speaks in hazard ratios.

Decision Checklist

  • ✅ Outcome is a time-to-event variable (days, months, hours, cycles)
  • ✅ Some observations may be right-censored (event not yet observed)
  • ✅ You want to express effects as a time ratio (e.g., "Group B lasts 1.7× longer")
  • ✅ You suspect proportional hazards may be violated
  • ✅ You have at least ~10 events per covariate
  • ❌ Do not use if data are not time-to-event → use OLS, logistic, etc.
  • ❌ Do not use if you cannot specify a parametric distribution → use Cox PH
  • ❌ Avoid if censoring exceeds 80% — estimates become unstable

Real-World Examples

  1. Medical Research — comparing time to disease relapse between treatment arms in an oncology RCT.
  2. Reliability Engineering — predicting time to failure of mechanical bearings under different loads.
  3. Wildlife Ecology — modelling time to first camera-trap detection across habitat types in Indian forests.
  4. Software Engineering — comparing time to bug-fix between teams using different methodologies.
  5. Public Health — modelling time to drug-cessation in a smoking-cessation programme.

Sample Size Guidance

  • Minimum: 10 events per covariate (not per subject)
  • Recommended: 20 events per covariate for stable time-ratio estimates
  • Censoring < 50%: ideal; > 80%: results are unreliable

Decision Tree (Survival Models)

Time-to-event outcome
├── PH assumption holds, no parametric form needed → Cox PH
├── Want time-ratio interpretation, parametric form OK → AFT  ← THIS TOOL
│     ├── Monotonic hazard → Weibull AFT
│     ├── Hazard rises then falls → Log-normal / Log-logistic AFT
│     └── Constant hazard → Exponential AFT (= Weibull k=1)
├── Multiple competing event types → Fine-Gray
└── No covariates, just curve estimation → Kaplan–Meier
📝 How to Use This Tool — Step-by-Step Guide

Step 1 — Enter Your Data

Choose one of three input methods: paste comma-separated values, upload a CSV/Excel file, or fill the manual grid. The default placeholder shows the format 52, 48, 55, 61, 47, .... Mark censored observations by appending :0 to the value.

Step 2 — Choose a Sample Dataset

Five built-in samples cover medical, mechanical, oncology, wildlife, and software contexts. Selecting a sample auto-populates two groups so you can run the analysis instantly.

Step 3 — Configure Settings

Pick a distribution (Weibull, log-normal, log-logistic) and an alpha level (0.01, 0.05, 0.10). Weibull is the safest default for monotonic hazards.

Step 4 — Run the Analysis

Click Run AFT Analysis. The model is fit by maximum likelihood. Results, four charts, and APA-ready text appear automatically.

Step 5 — Read the Summary Cards

Four cards show: median survival per group, the time ratio, the p-value, and the chosen distribution. Green = significant at your α level; amber = borderline.

Step 6 — Read the Full Results Table

Inspect coefficients (β), standard errors, time ratios, 95% CIs, p-values, AIC/BIC, log-likelihood, and the scale parameter σ.

Step 7 — Examine the Four Visualizations

(1) Survival curves per group, (2) hazard curves, (3) log-cumulative-hazard for assumption checking, (4) coefficient forest plot with 95% CIs.

Step 8 — Check Assumptions

Verify the chosen distribution fits via Q-Q residual checks and AIC/BIC comparison. Refit with another distribution if AIC differs by > 4.

Step 9 — Read the Interpretation

The plain-language interpretation block translates time ratios, p-values, and effect sizes into real-world meaning ready for reports.

Step 10 — Export

Use Download Doc for a plain-text report or Download PDF for a print-ready A4 document. Both contain all results, interpretation, and references.

❓ Frequently Asked Questions

Q1. What is the Accelerated Failure Time (AFT) model and when should I use it?

The AFT model is a parametric survival regression that models the logarithm of survival time as a linear function of covariates. Use it when you want a direct, interpretable effect on time-to-event — for example, "the treatment makes patients survive 1.8 times longer" — and especially when proportional hazards is questionable.

Q2. What is a p-value, and how do I interpret it for AFT?

The p-value is the probability of observing a time ratio at least as extreme as yours if the predictor truly had no effect. A p of 0.03 means there is a 3% chance of seeing this much acceleration or deceleration of survival time by chance alone. It is not the probability that the null is true.

Q3. Does statistical significance equal practical importance in AFT?

No. A time ratio of 1.05 may be statistically significant in a huge dataset but practically trivial — patients live only 5% longer. Always inspect the magnitude of the time ratio and its 95% CI alongside the p-value. Clinical or operational significance must be judged in context.

Q4. What is the time ratio (TR) and how do I interpret its value?

TR = exp(β). TR = 1 means no effect on time. TR > 1 means the predictor extends survival time multiplicatively (e.g., TR = 1.5 → 50% longer). TR < 1 means it shortens survival time. TRs are the natural effect size of AFT.

Q5. What assumptions does AFT require, and what if my data violate them?

AFT assumes (i) the chosen distribution fits — check via AIC/BIC and Q-Q residuals; (ii) covariates act multiplicatively on time; (iii) censoring is non-informative. If the chosen distribution misfits, switch to log-normal or log-logistic. If censoring is informative, use joint or pattern-mixture models.

Q6. How large a sample do I need?

The rule of thumb is 10 events (not subjects) per covariate, with 20 events per covariate preferred. Heavy right-censoring (> 80%) makes parameter estimates unstable regardless of sample size.

Q7. AFT vs Cox proportional hazards — which should I use?

Use Cox if you want hazard ratios and don't want to specify a parametric distribution. Use AFT if you want time ratios (often easier for clinicians and patients to understand) or if proportional hazards is violated. Weibull AFT uniquely supports both interpretations.

Q8. How do I report AFT results in APA 7 format?

Report the distribution, model fit, β, time ratio with 95% CI, and p-value. Example: "A Weibull AFT model showed Group B survived 1.78 times longer than Group A (TR = 1.78, 95% CI [1.21, 2.61], p = .003)." See the five reporting templates in the Plain Language Interpretation section above.

Q9. Can I use this calculator for published research?

This tool is for educational use, exploratory analysis, and learning. For peer-reviewed publication or regulatory submission, replicate the analysis with R (survival::survreg, flexsurv::flexsurvreg) or Python (lifelines.WeibullAFTFitter) and cite the software version. Cite this tool as: STATS UNLOCK. (2026). Accelerated Failure Time calculator. https://statsunlock.com.

Q10. What if my AFT results are non-significant?

Non-significance does not prove the predictor has no effect. Check whether the study had adequate power, whether follow-up was long enough, and whether censoring was excessive. Consider a Bayesian AFT analysis to quantify evidence in favour of the null using a Bayes factor.

📚 References

The following references support the methods used in this Accelerated Failure Time (AFT) calculator, covering parametric survival models, time ratio interpretation, and best practices in censored time-to-event analysis and statistical reporting.

  1. Wei, L. J. (1992). The accelerated failure time model: A useful alternative to the Cox regression model in survival analysis. Statistics in Medicine, 11(14–15), 1871–1879. https://doi.org/10.1002/sim.4780111409
  2. Kalbfleisch, J. D., & Prentice, R. L. (2002). The Statistical Analysis of Failure Time Data (2nd ed.). Wiley. https://doi.org/10.1002/9781118032985
  3. Collett, D. (2015). Modelling Survival Data in Medical Research (3rd ed.). Chapman & Hall/CRC. https://doi.org/10.1201/b18041
  4. Klein, J. P., & Moeschberger, M. L. (2003). Survival Analysis: Techniques for Censored and Truncated Data (2nd ed.). Springer. https://doi.org/10.1007/b97377
  5. Cox, D. R., & Oakes, D. (1984). Analysis of Survival Data. Chapman & Hall.
  6. Therneau, T. M., & Grambsch, P. M. (2000). Modeling Survival Data: Extending the Cox Model. Springer. https://doi.org/10.1007/978-1-4757-3294-8
  7. Hosmer, D. W., Lemeshow, S., & May, S. (2008). Applied Survival Analysis: Regression Modeling of Time-to-Event Data (2nd ed.). Wiley. https://doi.org/10.1002/9780470258019
  8. Royston, P., & Parmar, M. K. B. (2002). Flexible parametric proportional-hazards and proportional-odds models for censored survival data, with application to prognostic modelling. Statistics in Medicine, 21(15), 2175–2197. https://doi.org/10.1002/sim.1203
  9. Bradburn, M. J., Clark, T. G., Love, S. B., & Altman, D. G. (2003). Survival analysis Part III: Multivariate data analysis — choosing a model and assessing its adequacy and fit. British Journal of Cancer, 89(4), 605–611. https://doi.org/10.1038/sj.bjc.6601120
  10. Crowther, M. J., & Lambert, P. C. (2014). A general framework for parametric survival analysis. Statistics in Medicine, 33(30), 5280–5297. https://doi.org/10.1002/sim.6300
  11. Davidson-Pilon, C. (2019). lifelines: Survival analysis in Python. Journal of Open Source Software, 4(40), 1317. https://doi.org/10.21105/joss.01317
  12. Therneau, T. M. (2024). survival: A Package for Survival Analysis in R. R package. https://CRAN.R-project.org/package=survival
  13. Jackson, C. (2016). flexsurv: A platform for parametric survival modeling in R. Journal of Statistical Software, 70(8), 1–33. https://doi.org/10.18637/jss.v070.i08
  14. American Psychological Association. (2020). Publication Manual of the American Psychological Association (7th ed.). APA. https://doi.org/10.1037/0000165-000
  15. NIST/SEMATECH. (2013). e-Handbook of Statistical Methods — Reliability. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/

Leave a Reply

Your email address will not be published. Required fields are marked *

Previous Post

© 2026 STATS UNLOCK . statsunlock.com –  All Rights Reserved.