Data preparation

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().

✅ No login needed100% freeRuns in your browserYour data stays on your device
Data Transformation Calculator✅ Free · no login📚 Cite this tool
Your data never leaves your PC. Your data is analysed on your own computer or phone, even when you upload a CSV or Excel file. Nothing is uploaded, stored or seen by Codanics, and no login is needed.
  • 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.

Citation · APA 7th edition

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.

🚀 Follow Codanics channel on WhatsApp for more updatesNew free tools, scholarships, PhD positions and research tips, straight to your phone. Free lessons on YouTube too.

How to use the data transformation calculator

  1. Paste your values (one variable) or load a column with Paste from Excel or Upload CSV / Excel.
  2. 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.
  3. 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.
  4. 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?

DataUsual transformationWhy
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 ≈ meanSquare root (√(x + 0.5) with zeros)Stabilises Poisson-type variance.
Percentages and proportions (germination %, disease incidence)Arcsine √p or logitSpreads out values near 0% and 100%.
Times, rates with a few very large valuesReciprocalStrongest pull on the right tail.
Left-skewed (ceiling effects)SquareStretches the upper end.
Not sureBox–CoxFinds the best power λ; λ = 0 is log, 0.5 square root, 1 no change, −1 reciprocal.

Formulas

log y’ = log₁₀(y + c) or ln(y + c) square root y’ = √(y + c) arcsine y’ = arcsin(√p), p = proportion (percentage / 100), result in radians logit y’ = ln( p / (1 − p) ) (0 and 1 replaced by (p(n − 1) + 0.5)/n) Box–Cox y’ = (y^λ − 1) / λ, λ ≠ 0; y’ = ln y, λ = 0 λ̂ maximises L(λ) = −(n/2) ln Σ(y’ᵢ − ȳ’)² + (λ − 1) Σ ln yᵢ , 95% CI: L(λ) ≥ L(λ̂) − 1.92

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.

For ANOVA, what matters is that the residuals within groups are roughly normal with similar variances, not the pooled raw data. If your values come from several groups, check each group (or the residuals) with the normality test and the Levene’s test calculator after transforming.
Learn the statistics behind these numbers. Codanics has free statistics, R and Python lessons on YouTube and full courses for researchers.

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

Made by Dr. Muhammad Aammar Tufail, Codanics. First published 17 November 2026, last updated 16 November 2026. Found a bug or have an idea for a new tool? Tell us on the WhatsApp channel or in the comments on YouTube. Results are for learning and planning; check important analyses with a statistician or your supervisor.