Fit a binary logistic regression in your browser. Paste your data and get the coefficients, odds ratios with 95% confidence intervals, Wald p-values, the likelihood-ratio test, and McFadden's R-squared, with R, Python, and an APA-formatted results report. The fit matches statsmodels.
Header row required. Comma or tab separated. The outcome must be binary (0/1, or two labels such as Yes/No). Predictors must be numeric; code categorical predictors as dummy variables first. Showing example data until you paste your own.
Drag & drop a file or
CSV, TSV, Excel (.xlsx/.xls) - max 500 rows
| Predictor | B | SE | z | p | OR | 95% CI (OR) |
|---|---|---|---|---|---|---|
| Constant | -2.585 | 1.394 | -1.85 | .064 | ||
| dose | 1.513 | 0.733 | 2.07 | .039 | 4.54 | [1.08, 19.10] |
The modeled event is outcome = 1; odds ratios describe the odds of that outcome level. B is on the log-odds scale; OR = exp(B) is the multiplicative change in the odds of the event per one-unit increase in the predictor, holding the others constant. Classification accuracy at a 0.5 cutoff: 75.0%. McFadden's R² is not comparable to linear R²; .2 to .4 already indicates excellent fit.
Logistic regression is the standard method whenever the outcome is binary, and its results are read through odds ratios. Each predictor's coefficient B is on the log-odds scale; its exponential, exp(B), is the odds ratio, the multiplicative change in the odds of the event for a one-unit increase in that predictor while the others are held constant. An odds ratio above 1 raises the odds, below 1 lowers them, and a confidence interval that crosses 1 means the direction of the effect is not established. Using this calculator's single-predictor example (dose predicting an event across 24 observations), the write-up reads:
A binary logistic regression was conducted to predict the event from dose (N = 24, events = 13). The model was statistically significant, likelihood-ratio χ²(1) = 5.33, p = .021, McFadden's R² = .16. Each one-unit increase in dose multiplied the odds of the event by 4.54 (OR = 4.54, 95% CI [1.08, 19.10], p = .039).
Two cautions matter most. First, McFadden's R-squared is not the proportion of variance explained; values of .2 to .4 already indicate excellent fit, so it should never be judged against linear-regression R-squared benchmarks. Second, with small samples or a predictor that perfectly separates the outcome, the maximum-likelihood estimates diverge and the odds ratios become meaningless; this tool detects that separation and warns you, and the fix is a penalized (Firth) logistic regression or a larger sample. As a planning rule of thumb, aim for roughly ten events per predictor.
Next step
Predictor selection, interaction and linearity checks, separation handling, calibration, and a publication-ready APA results section.
Our promise: Free re-run and re-write if reviewers question the analysis or reporting.
Timeline
Most projects deliver in under 2 weeks. We confirm an exact date in your quote.
If reviewers push back
If reviewers question the analysis, assumptions, or reporting, we re-run and re-write free.
Confidentiality
NDA available on request before any project discussion. Your data, study design, and manuscript stay private either way.
Want a PhD methodologist to handle the whole project?
Get a complete systematic review or meta-analysis handled end-to-end. Free rework on search, screening, or synthesis if reviewers push back. Pay only after you approve your quote.
Unlike linear regression, logistic regression has no closed-form solution; the coefficients are found by maximum likelihood. This calculator uses iteratively reweighted least squares (IRLS, equivalent to Newton-Raphson on the log-likelihood), the same algorithm behind R's glm and Python's statsmodels Logit, and its estimates match statsmodels to five decimal places. The standard errors come from the inverse of the observed information matrix at the solution, the p-values are Wald tests, and the confidence intervals for the odds ratios are exp(B plus or minus 1.96 times the standard error). The overall model is tested with the likelihood-ratio statistic comparing the fitted model against the intercept-only model, and fit is summarized with McFadden's pseudo R-squared and the AIC.
Predictors must be numeric, so categorical predictors should be entered as dummy (0/1) variables, one per non-reference level. The outcome can be entered as 0/1 or as two labels such as Yes/No. For a single binary predictor, the odds ratio equals the one from a 2x2 table, which the odds ratio calculator computes directly; for a continuous outcome instead of a binary one, use the linear regression calculator.
Logistic regression predicts a yes/no outcome from one or more predictors. Instead of fitting a straight line like linear regression, it models the log-odds of the event, which keeps the predicted probability between 0 and 1. The output most people report is the odds ratio for each predictor: how many times the odds of the event multiply for each one-unit increase in that predictor. It is the standard method whenever the thing being predicted is binary, such as disease versus no disease, or pass versus fail.
Read the odds ratio (OR) for each predictor. An OR above 1 means the predictor increases the odds of the event; below 1 means it decreases them; and 1 means no effect. Check whether the 95% confidence interval excludes 1, which mirrors the p-value, and interpret each OR as holding the other predictors constant. The coefficient B beside it is the same effect on the log-odds scale, where OR = exp(B). Judge the whole model with the likelihood-ratio test and McFadden's R-squared, remembering that McFadden values of .2 to .4 already indicate excellent fit.
The odds ratio is the exponential of a predictor's coefficient, exp(B). It is the factor by which the odds of the event change for a one-unit increase in that predictor. An odds ratio of 2.5 means the odds are two and a half times higher; an odds ratio of 0.5 means the odds are halved; an odds ratio of 1.5 means a 50 percent increase in the odds. Because it is a ratio of odds rather than probabilities, it overstates the change in risk when the outcome is common, so report predicted probabilities too when communicating to a non-technical audience.
Linear regression predicts a continuous outcome and its coefficients are changes in the outcome itself. Logistic regression predicts a binary outcome and its coefficients are changes in the log-odds, reported as odds ratios. Linear regression is fit by least squares and reports R-squared as variance explained; logistic regression is fit by maximum likelihood (this tool uses iteratively reweighted least squares) and reports pseudo R-squared measures such as McFadden's, which are not comparable to linear R-squared. Use linear regression for measurements and logistic regression for yes/no outcomes.
Not sure logistic regression is the right method? The statistical test selector confirms it from your design. For a single binary predictor, the odds ratio calculator gives the same odds ratio from a 2x2 table, and the relative risk calculator adds the absolute-risk view. For a continuous outcome, use the linear regression calculator.
Reviewed by
Dr. Sarah Mitchell holds a PhD in Biostatistics from Johns Hopkins Bloomberg School of Public Health and has over 15 years of experience in systematic review methodology and meta-analysis. She has authored or co-authored 40+ peer-reviewed publications in journals including the Journal of Clinical Epidemiology, BMC Medical Research Methodology, and Research Synthesis Methods. A former Cochrane Review Group statistician and current editorial board member of Systematic Reviews, Dr. Mitchell has supervised 200+ evidence synthesis projects across clinical medicine, public health, and social sciences. She reviews all Research Gold tools to ensure statistical accuracy and compliance with Cochrane Handbook and PRISMA 2020 standards.
From data cleaning and assumption checks to the full analysis and a publication-ready results section, we handle the numbers so you can focus on the science.
Our promise: Free re-run and re-write if reviewers question the analysis or reporting.