Weibull Regression Calculator
Free online parametric survival analysis tool — fit Weibull AFT models, estimate shape and scale parameters, hazard ratios, p-values, and APA-format results from your time-to-event data.
📥 Data Input
Format: comma-separated values. Example placeholder shows: 52, 48, 55, 61, 47, … Each cluster/group enters its own row. The group name is editable.
📌 Click columns that should each become a cluster — selected columns will be loaded as separate clusters. Numeric columns only.
Click cells to edit values. Leave blank to skip. Use the buttons to add/remove rows.
⚙️ Model Configuration
📚 Technical Notes & Formulas
A. Formulas Used
Weibull Probability Density Function (PDF): f(t; k, λ) = (k/λ) · (t/λ)^(k-1) · exp[-(t/λ)^k] Weibull Survival Function: S(t; k, λ) = exp[-(t/λ)^k] Weibull Hazard Function: h(t; k, λ) = (k/λ) · (t/λ)^(k-1) Weibull Cumulative Hazard: H(t; k, λ) = (t/λ)^k Weibull AFT Model: log(T) = β₀ + β₁ X + σ ε, where ε ~ extreme value distribution Equivalently: T = λ · exp(βX) · W^(1/k), W ~ Exp(1) Weibull PH Model: h(t | X) = h₀(t) · exp(γX) Linkage to AFT: γ = -k · β Log-Likelihood (with right-censoring; δᵢ = 1 if event, 0 if censored): ℓ(k, λ) = Σ δᵢ [log k - k log λ + (k-1) log tᵢ] - Σ (tᵢ/λ)^k Maximum-Likelihood Estimators (uncensored, simple Weibull): k̂ solves: 1/k̂ + (1/d) Σ log tᵢ - [Σ tᵢ^k̂ log tᵢ] / [Σ tᵢ^k̂] = 0 λ̂ = ( (1/d) Σ tᵢ^k̂ )^(1/k̂) Hazard Ratio (PH form): HR = exp(γ) = exp(-k̂ · β̂) Standard Error & 95% CI: SE(β) = √[diag(I⁻¹(β))] ; 95% CI: β̂ ± 1.96 · SE(β̂) Wald p-value: z = β̂ / SE(β̂) ; p = 2·[1 − Φ(|z|)] Akaike Information Criterion: AIC = -2·ℓ + 2·p Where: t = observed time-to-event k = Weibull shape parameter λ = Weibull scale parameter T = random survival time X = covariate vector β = AFT coefficient γ = PH coefficient δᵢ = event indicator d = number of events σ = 1/k = AFT scale ℓ = log-likelihood p = number of parameters Φ = standard-normal CDF
B. Technical Notes
- Estimation: Parameters are obtained by maximum-likelihood estimation. Iterative Newton-Raphson (or scoring) is used internally for shape k when no closed form exists.
- Right censoring: Censored observations contribute the survival probability at their censoring time; only events contribute the density.
- Link AFT ↔ PH: The Weibull is the only continuous distribution that admits both AFT and PH parameterisations simultaneously.
- Exponential as a special case: When k = 1, Weibull reduces to the exponential model with constant hazard.
- Compare models: Use AIC/BIC to compare against exponential, log-normal, log-logistic, and generalised gamma alternatives.
- Goodness of fit: A near-linear log(-log S(t)) vs log(t) plot supports the Weibull assumption.
✅ When to Use Weibull Regression
This free Weibull regression calculator is designed for any researcher analysing time-to-event data — clinical trial endpoints, engineering reliability tests, customer-churn timing, equipment lifespan, or biological survival studies — when an absolute-time interpretation and a parametric distributional fit are both required.
Decision Checklist
- ✓ The outcome is time-to-event (positive, continuous).
- ✓ You may have right-censored observations (subjects who haven't yet had the event).
- ✓ A monotonic hazard (constantly increasing or decreasing failure rate) is plausible.
- ✓ You want both hazard ratios and absolute survival probabilities.
- ✓ You want a model that supports AFT and PH interpretations.
- ✗ Do NOT use if the hazard is non-monotonic (rises then falls) — consider log-normal or log-logistic instead.
- ✗ Do NOT use for binary outcome at fixed follow-up — use logistic regression.
- ✗ Do NOT use if the proportional-hazards assumption is rejected and AFT is also implausible — use Cox with time-varying covariates or stratified Cox.
Real-World Examples
Sample-Size Guidance
A common rule is 10 to 15 events per covariate. With one binary group covariate plus an intercept, aim for at least 20 to 30 events per group; for stable shape estimation, 50 to 100 events overall is preferable.
Decision Tree
Time-to-event outcome?
└── No → Logistic / Linear regression
└── Yes → Censored data?
└── No → Weibull AFT (this tool) or linear log(T)
└── Yes → Parametric assumption ok?
├── Yes, monotonic hazard → Weibull regression (this tool)
├── Yes, non-monotonic → log-normal / log-logistic
└── No → Cox proportional-hazards model
🧭 How to Use This Weibull Regression Calculator
- Enter your data. Use the Paste tab and the placeholder format — for example
52, 48, 55, 61, 47— one cluster per row. Each cluster's name is editable. - Or pick a sample dataset. Five built-in datasets cover medical, engineering, customer-churn, light-bulb, and treatment-recovery contexts.
- Configure the model. Pick α (default 0.05), the parameterisation (AFT vs PH), reference group, and a censoring rule.
- Click "Run Weibull Regression Analysis". All results stream in immediately.
- Read the summary cards. Shape k, scale λ, log-likelihood, AIC, and overall p-value tell you the headline picture.
- Read the coefficients table. Each group's β (AFT), HR (PH), 95% CI, and Wald p-value are listed with one row per group.
- Inspect the four plots. Survival curves, hazard curves, density curves, and the Q-Q diagnostic together verify the Weibull fit.
- Check assumptions. The badges flag the Weibull-shape diagnostic, censoring proportion, and sample-size rule of thumb.
- Read the interpretation. Five ready-made write-ups cover APA, dissertation, plain-language, abstract, and pre-registration formats.
- Export. Download a Doc, a PDF, or copy the summary line for your manuscript.
❓ Frequently Asked Questions
Q1. What is Weibull regression and when should I use it?
Q2. How is Weibull regression different from Cox proportional-hazards regression?
Q3. What does the Weibull shape parameter k mean in practice?
Q4. What is the Weibull AFT versus PH parameterisation?
Q5. How do I read a hazard ratio from this calculator?
Q6. How does the calculator handle censored data?
Q7. How do I check whether the Weibull assumption holds?
Q8. What sample size do I need for stable estimates?
Q9. Is Weibull regression appropriate for "bath-tub" hazards that fall then rise?
Q10. Can I report Weibull regression results in APA 7 format?
📚 References
The following references support the statistical methods used in this Weibull regression calculator, covering parametric survival regression, accelerated failure time modelling, and best practices in censored time-to-event analysis.
- Weibull, W. (1951). A statistical distribution function of wide applicability. Journal of Applied Mechanics, 18(3), 293–297. https://doi.org/10.1115/1.4010337
- Cox, D. R. (1972). Regression models and life-tables. Journal of the Royal Statistical Society: Series B, 34(2), 187–220. https://doi.org/10.1111/j.2517-6161.1972.tb00899.x
- Kalbfleisch, J. D., & Prentice, R. L. (2002). The statistical analysis of failure time data (2nd ed.). Wiley. https://doi.org/10.1002/9781118032985
- Klein, J. P., & Moeschberger, M. L. (2003). Survival analysis: Techniques for censored and truncated data (2nd ed.). Springer. https://doi.org/10.1007/b97377
- Collett, D. (2015). Modelling survival data in medical research (3rd ed.). CRC Press. https://doi.org/10.1201/b18041
- 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
- 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
- Lawless, J. F. (2003). Statistical models and methods for lifetime data (2nd ed.). Wiley. https://doi.org/10.1002/9781118033005
- Aalen, O. O., Borgan, Ø., & Gjessing, H. K. (2008). Survival and event history analysis: A process point of view. Springer. https://doi.org/10.1007/978-0-387-68560-1
- Bender, R., Augustin, T., & Blettner, M. (2005). Generating survival times to simulate Cox proportional-hazards models. Statistics in Medicine, 24(11), 1713–1723. https://doi.org/10.1002/sim.2059
- Bradburn, M. J., Clark, T. G., Love, S. B., & Altman, D. G. (2003). Survival analysis. Part II: Multivariate data analysis – an introduction to concepts and methods. British Journal of Cancer, 89, 431–436. https://doi.org/10.1038/sj.bjc.6601119
- Royston, P., & Parmar, M. K. B. (2002). Flexible parametric proportional-hazards and proportional-odds models for censored survival data. Statistics in Medicine, 21(15), 2175–2197. https://doi.org/10.1002/sim.1203
- American Psychological Association. (2020). Publication manual of the American Psychological Association (7th ed.). APA. https://doi.org/10.1037/0000165-000
- R Core Team. (2024). R: A language and environment for statistical computing. R Foundation for Statistical Computing. https://www.R-project.org/
- NIST/SEMATECH. (2013). e-Handbook of statistical methods — Weibull distribution. National Institute of Standards and Technology. https://www.itl.nist.gov/div898/handbook/eda/section3/eda3668.htm









