Calculator inputs
Example data table
| Study arm | Outcome type | Observed value | Sample size | Interpretation |
|---|---|---|---|---|
| Treatment A | Continuous | Mean score = 64, SD = 12 | 120 | Average performance under the intervention. |
| Control A | Continuous | Mean score = 58, SD = 11 | 115 | Reference mean for comparison. |
| Treatment B | Binary | 38 events | 150 | Intervention event count for a yes or no endpoint. |
| Control B | Binary | 24 events | 150 | Baseline event count for risk comparisons. |
Formula used
Continuous outcomes
Mean difference: MD = Meantreatment − Meancontrol
Standard error: SE = √[(SDt2 / nt) + (SDc2 / nc)]
Confidence interval: MD ± zα/2 × SE
Cohen's d: d = MD / pooled SD
Hedges' g: g = d × small-sample correction
Binary outcomes
Risk: Risk = Events / Total
Risk difference: RD = Risktreatment − Riskcontrol
Risk ratio: RR = Risktreatment / Riskcontrol
Odds ratio: OR = (a × d) / (b × c)
NNT or NNH: 1 / |RD| when RD is not zero
This page uses large-sample normal approximations for intervals and two-sided significance checks.
How to use this calculator
1. Pick the outcome type
Choose continuous outcomes for means and standard deviations, or binary outcomes for event counts and totals.
2. Enter treatment and control data
Complete the fields for each study arm. Keep sample sizes positive and event counts below totals.
3. Adjust the alpha level
Use 0.05 for a standard 95% interval, or lower it when you need stricter inference.
4. Calculate and inspect the summary
Read the main effect estimate first, then confirm the interval width and approximate p-value.
5. Review the graph
The chart visualizes group means or event rates, making the treatment contrast easier to communicate.
6. Export your output
Download a CSV for analysis pipelines or a PDF for reports, teaching notes, and stakeholder updates.
Frequently asked questions
1. What does treatment effect mean?
Treatment effect is the observed difference between an intervention group and a control group. It can be expressed as a mean difference, risk difference, risk ratio, odds ratio, or standardized difference depending on the study design and outcome scale.
2. When should I use continuous outcomes?
Use continuous outcomes when the measured endpoint is numeric and can take many values, such as test scores, blood pressure, income, time, or response scales. These analyses compare averages and account for spread using standard deviations.
3. When should I use binary outcomes?
Choose binary outcomes when each subject either experiences an event or does not. Examples include recovery, conversion, churn, relapse, purchase, or defect occurrence. The calculator then reports risks, differences, ratios, and odds-based measures.
4. What is the difference between risk difference and risk ratio?
Risk difference shows the absolute percentage-point gap between groups. Risk ratio shows the relative change by dividing treatment risk by control risk. Absolute measures help with planning impact, while relative measures help compare strength across contexts.
5. Why include Cohen's d and Hedges' g?
These summarize standardized effects for continuous outcomes. Cohen's d rescales the mean difference by pooled variation, while Hedges' g adds a small-sample correction. They help compare intervention strength across studies measured on different numeric scales.
6. What does the confidence interval tell me?
The confidence interval gives a plausible range for the true effect under the model assumptions. Narrow intervals suggest more precision. If the interval crosses zero for differences, the observed effect is less clearly separated from no effect.
7. Is the p-value exact?
This implementation uses large-sample normal approximations for quick reporting. That is often suitable for teaching, screening, and many practical datasets, but exact or model-specific methods may be preferable for small samples, rare events, or complex experimental structures.
8. Can I use this for A/B tests or clinical trials?
Yes. The calculator fits A/B tests, pilot interventions, randomized studies, educational experiments, and simple clinical summaries. Just select the outcome type that matches your endpoint and confirm that treatment and control groups are defined consistently.