Data Transformation Calculator: Log, Square Root, Arcsine and Box–Cox with Normality Check
Skewed counts, concentrations or percentages? Paste your values and see at once which transformation makes them closest to normal: log, ln, square root, arcsine (for percentages), logit, reciprocal, square or Box–Cox with the best λ. Shapiro–Wilk and skewness are shown before and after, with histograms, back-transformed means and a download of the transformed column. Box–Cox λ matches R’s MASS::boxcox().
- PriceFree, no login or sign-up needed
- Your dataProcessed in your browser, never uploaded
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published17 November 2026
- Last updated16 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Data transformation calculator: log, square root, arcsine and Box–Cox with normality check [Online tool]. Codanics. Retrieved 16 November 2026, from https://codanics.com/tools/data-transformation-calculator/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 17 November 2026.
How to use the data transformation calculator
- Paste your values (one variable) or load a column with Paste from Excel or Upload CSV / Excel.
- Click Compare transformations. The table shows skewness and the Shapiro–Wilk test for the original data and for every transformation; the green row is closest to normal.
- Click any row (or use the menu) to apply that transformation. Check the before-and-after histograms and, for Box–Cox, whether a simple log or square root lies inside the λ confidence interval.
- Download the original and transformed values as CSV, copy the transformed column into Excel or SPSS, and copy the sentence for your methods section.
Which transformation for which data?
| Data | Usual transformation | Why |
|---|---|---|
| Concentrations, CFU, biomass, income (right-skewed, SD grows with the mean) | log (log₁₀ or ln; add 1 if there are zeros) | Turns multiplicative effects into additive ones. |
| Counts (insects, lesions, colonies), variance ≈ mean | Square root (√(x + 0.5) with zeros) | Stabilises Poisson-type variance. |
| Percentages and proportions (germination %, disease incidence) | Arcsine √p or logit | Spreads out values near 0% and 100%. |
| Times, rates with a few very large values | Reciprocal | Strongest pull on the right tail. |
| Left-skewed (ceiling effects) | Square | Stretches the upper end. |
| Not sure | Box–Cox | Finds the best power λ; λ = 0 is log, 0.5 square root, 1 no change, −1 reciprocal. |
Formulas
Normality is checked with the Shapiro–Wilk test (Royston’s algorithm, identical to R’s shapiro.test()). Skewness is g₁ = m₃/m₂^1.5 and kurtosis is excess g₂ = m₄/m₂² − 3.
Worked example
The example has 30 simulated bacterial counts (CFU/mL) from a log-normal distribution. On the original scale the data are strongly right-skewed (Shapiro–Wilk p < .001). After log₁₀ the skewness drops to near zero and W = 0.962, p = .350. Box–Cox gives λ = 0.089 with a 95% CI of about −0.15 to 0.33; λ = 0 lies inside, so the simple log is the sensible choice. The same λ and CI come from MASS::boxcox(lm(y ~ 1)) in R.
Reporting and back-transforming
Run your test (t-test, ANOVA) on the transformed values, but report means in the original units. For log data, the back-transformed mean is the geometric mean, and back-transformed confidence limits are asymmetric. Differences between log means back-transform to ratios (for example, “treatment counts were 2.4 times higher”). If no transformation works, consider a non-parametric test such as Mann–Whitney or Kruskal–Wallis, or a generalised linear model.
Frequently asked questions
How do I choose between log and square-root transformation?
Use log for measurements where the SD grows in proportion to the mean (concentrations, CFU, biomass). Use square root for counts where the variance is about equal to the mean. This tool compares both; if Box–Cox λ is near 0, log is best; near 0.5, square root.
What constant should I add before a log transformation if I have zeros?
Adding 1 (log(x + 1)) is common for counts. For small values like concentrations, a constant of about half the smallest non-zero value is often better. Type your own value in the Constant box, and report it.
Should I use the arcsine transformation for percentages?
It is the traditional choice for percentages from counts (such as germination %). Many statisticians now prefer logistic regression on the original counts, but arcsine or logit is still widely accepted for ANOVA on percentages.
What does the Box–Cox λ mean?
λ is the power that makes the data most normal: 1 means no change, 0.5 square root, 0 log, −1 reciprocal. Choose a simple value inside the confidence interval rather than an awkward exact λ.
How do I report a transformed mean?
Report the back-transformed mean with its confidence interval in the original units. For a log transformation that is the geometric mean, shown under the histograms.
Is my data uploaded?
No. All calculations run in your browser and nothing is stored or sent anywhere.
Do I need to log in or create an account to use the data transformation calculator?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Data transformation calculator: log, square root, arcsine and Box–Cox with normality check [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/data-transformation-calculator/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel