Box-Cox Power Transformation y^(λ) = (y^λ − 1)/λ & Inverse Back-Transformation Calculator

Transform skewed positive data via Box-Cox power parameter λ and bias-corrected inverse.

Box-Cox Transformed Value y^(0.5) 8 transformed
Bias-Corrected Back-Transform Mean 25.038 units
Natural Log Baseline (λ = 0) 3.219 ln(y)
Jacobian Weight y^(λ − 1) 0.2 dy^(λ)/dy
Inputs
Try:
y
Strictly positive original observation y (> 0).
λ
Box-Cox power parameter λ (−2 to +2; 0=log, 0.5=square-root, −1=reciprocal).
σ²
Transformed-scale forecast error variance σ² for Smearing/Taylor bias correction.
Results & Graph
Box-Cox Transformed Value y^(0.5)
8 transformed
Bias-Corrected Back-Transform Mean
25.038 units
Natural Log Baseline (λ = 0)
3.219 ln(y)
Jacobian Weight y^(λ − 1)
0.2 dy^(λ)/dy

Box-Cox Transformed Value y^(0.5)

Graph 1 • How the inputs feed Box-Cox Power Transform
Box-Cox Power Transformation y^(λ) = (y^λ − 1)/λ & Inverse Back-Transformation Calculator • Custom Domain Schematic (Econometrics & Regression) positiveboxCoxLaBox-Cox Power Transfor Positive Value Y: 25 y • Box Cox Lambda: 0.500 λ BOX-COX TRANSFORMED VALUE 8 transformed • Bias-Corrected Back-Tr: 25.038 units • Natural Log Baseline (: 3.219 ln(y) Eq: y^(λ) = (y^λ − 1) / λ for λ ≠ 0
Graph 2 • Box-Cox Transformed Value y^(0.5) as Positive Value Y changes (40% to 160% of current)
0 transf 5.86 transf 11.71 transf 4.33 10y 5.75 15y 6.94 20y 8 25y 8.95 30y 9.83 35y 10.65 40y
Graph 3 • Positive Value Y and Box Cox Lambda together Compares Box-Cox Transformed Value y^(0.5) when Box Cox Lambda is shifted +25% (solid) vs. −25% (dashed).
0 transf 6.87 transf 13.74 transf --- Box Cox Lambda @ 75% 7.97 -30% 9.21 -15% 10.36 +0% 11.46 +15% 12.49 +30%
Summary: Transforming y = 25 with λ = 0.5 yields y^(λ) = 8 (bias-corrected back-transform with σ²=0.15 is 25.038).
Summary: Transforming y = 25 with λ = 0.5 yields y^(λ) = 8 (bias-corrected back-transform with σ²=0.15 is 25.038).
Interactive chart & math engine powered by CalculatorGraph

Formula: Box-Cox Power Transform Formula

yλ = (y^λ − 1) / λ for λ ≠ 0, else ln(y)
BiasCorrectedInverse ≈ (λ·ŷ + 1)1/λ × [1 + σ²(1−λ)/(2(λ·ŷ+1)²)]
y^(λ) = (y^λ − 1) / λ for λ ≠ 0, else ln(y); BiasCorrectedInverse ≈ (λ·ŷ + 1)^(1/λ) × [1 + σ²(1−λ)/(2(λ·ŷ+1)²)]
  • positiveValueY: Positive Value Y (y)
  • boxCoxLambda: Box Cox Lambda (λ)
  • transformedResidualVar: Transformed Residual Var (σ²)

Frequently Asked Questions

Does this calculator find the best λ for my data?

No. It transforms a single value with a λ you supply. Choosing λ needs the whole data set, usually by maximising the Box-Cox profile likelihood in statistical software, or by trying a few standard values and checking residual plots. Once you have λ, this page shows what it does to individual observations and to back-transformed predictions.

Why do all Box-Cox transforms of 1 equal zero?

Because 1 raised to any power is 1, and subtracting 1 leaves zero before the division by λ. The log of 1 is also zero, so the λ = 0 case agrees. This shared anchor point is the reason for the minus one in the formula. It makes the different members of the family directly comparable around y = 1.

Is the square-root transform here the same as taking √y?

It has the same shape but different numbers. At λ = 0.5 the calculator returns two times √y minus 2, so 25 becomes 8 rather than 5. For regression the difference is a shift and a rescaling, which change the coefficients but not the fit, residual pattern or significance tests. Use one form consistently within a single analysis.

When should I report the bias-corrected mean instead of the plain back-transform?

Report the corrected mean when forecasts will be summed or averaged, such as totals across regions or months, because the plain back-transform behaves more like a median and leads to totals that run low. For a single typical value, the plain version is often the better summary. Say which one you used either way.

Why is the correction tiny at λ = 0.5 but huge at λ = −1?

The correction divides by the square of λ times the transformed value plus one. At λ = 0.5 and y = 25 that term is 25, so the effect is small. At λ = −1 it is 0.0016, which magnifies any variance enormously. A variance suitable for one λ is usually far too large for a negative λ, so recheck σ².

What variance should I enter as σ²?

The residual variance from your model fitted on the transformed scale, at the same λ you enter here. Statistical software usually reports it as the mean squared error. Do not use the variance of the raw data, and do not carry a variance over from a model fitted at a different λ, because the scale of the transformed values changes with λ.

Can I enter a λ outside the range of minus two to two?

The calculator accepts it and computes a result. The help text suggests that range because fitted values beyond it are uncommon and hard to interpret, and very large positive or negative powers can produce extreme numbers. If your estimation keeps pointing outside that range, it may be worth checking for outliers or a different model.

Does a Box-Cox transform guarantee normally distributed residuals?

No. It chooses a power that makes the data closer to normal and the variance more stable, but some data cannot be made normal by any power, such as data with several peaks or many repeated values. Always check residual plots after transforming. The transform is a tool for improving a model, not a test that it is correct.

Why does λ = 0 give a different back-transform from a λ very close to zero?

The calculator uses two formulas. At exactly zero it applies the lognormal adjustment, e to the power σ² over 2. At any nonzero λ it uses a second-order Taylor approximation. On the default, λ = 0 gives 26.947 and λ = 0.0001 gives 26.874. The gap is a formula difference, not a modelling one.

How do I interpret coefficients after a Box-Cox transform?

Directly, only on the transformed scale. A coefficient says how much the transformed response changes per unit of the predictor. To talk about effects on the original scale, back-transform predictions at chosen predictor values and compare them, using this calculator for the bias correction. For λ = 0, coefficients can be read as approximate percentage effects.

Should I transform my data if λ comes out close to 1?

Often not. A λ near 1 means the data need little or no reshaping, and λ = 1 itself leaves the shape unchanged, as y = 25 becoming 24 shows. Keeping the original scale makes results easier to explain. Many analysts only transform when the confidence interval for λ clearly excludes 1.

Square root of 25, shifted and scaled: why the default gives 8

The default takes a single observation, y = 25, and a Box-Cox parameter of λ = 0.5. The transformed value is 8. The working is short enough to do by hand. Twenty-five to the power 0.5 is 5. Subtract 1 to get 4, then divide by λ, which is 0.5, and you have 8.

That is a square-root transform with two small adjustments. The subtraction of 1 and the division by λ do not change the shape of the transform at all. They exist so that every value of λ produces curves that pass through the same point and have the same slope at y = 1, and so that the family joins up smoothly with the log transform as λ approaches zero.

The supporting lines add three more figures. The natural log of 25 is 3.219, shown as a reference for what the λ = 0 transform would give. The Jacobian weight is 0.2. The bias-corrected back-transform mean is 25.038, which is the value the transform would return on the original scale once a residual variance of 0.15 is allowed for.

This calculator works on one value at a time. It does not estimate λ from a data set, and it does not measure skewness. You bring a λ you have already chosen, perhaps from a profile likelihood in statistical software, and the page shows what it does to a particular observation.

What different values of λ do to y = 25

Changing λ with y fixed at 25 shows how strongly each member of the family pulls in large values. At λ = 1 the transform is just y minus 1, so 25 becomes 24 and nothing about the shape of the data changes. At λ = 0.5, the default, it becomes 8. At λ = 0.25 it becomes 4.944. At λ = 0 the calculator switches to the natural log and returns 3.219.

Below zero the transform keeps compressing. At λ = −0.5 the value is 1.6, and at λ = −1, the reciprocal transform, it is 0.96. Negative values of λ squeeze large observations hard, and the transformed values of every positive y stay below minus one over λ. For λ = −1 that ceiling is exactly 1.

Above one the direction reverses. At λ = 2 the transform squares the value, which spreads large observations further apart. That is the right choice for data skewed to the left, but it is rarely what people need for incomes, prices, counts or reaction times, which tend to be skewed to the right.

The labels in the help text match the usual rules of thumb: λ = 1 leaves the data alone, 0.5 is a square root, 0 is a log and minus 1 is a reciprocal. Values between these are perfectly valid, though many analysts round a fitted λ to one of them to keep the model easy to explain.

Why the back-transform comes out at 25.038, not 25

If you transform 25 and then simply invert the transform, you get 25 back. The calculator shows something slightly different because it is answering another question. When a model is fitted on the transformed scale, its prediction is a mean on that scale. Undoing the transform turns that mean into something closer to a median on the original scale, and the original-scale mean is a little higher.

The correction uses the residual variance on the transformed scale, σ². The formula multiplies the plain back-transform by one plus σ² times (1 − λ), divided by twice the square of (λ times the transformed value plus 1). On the default that adds 0.038 to the result.

The square-root case has a neat property. With λ = 0.5 the correction always works out to σ² divided by four, added to the plain back-transform. So y = 15 gives 15.038, y = 38 gives 38.038, and y = 4 gives 4.038. The size of y makes no difference. Raise σ² to 0.6 and the default back-transform becomes 25.15, again exactly a quarter of the variance above 25.

With σ² set to zero the correction disappears and the result is exactly 25. At λ = 1 there is no correction either, because the transform is linear and the mean passes straight through.

The log case at λ = 0 uses a different correction

When λ is zero the calculator does not use the Taylor approximation. It applies the exact lognormal adjustment instead, multiplying the plain back-transform by e to the power of σ² over 2. On the default that turns 25 into 26.947.

Set λ to a tiny nonzero value, such as 0.0001, and the transformed value is still 3.219, but the back-transform becomes 26.874. The difference comes from switching formulas. The Taylor version is a second-order approximation, while the log case uses the exact result for normally distributed log errors. The two agree closely for small σ² and drift apart as it grows.

This matters if you are comparing models fitted at slightly different λ values near zero. A jump in the back-transformed mean of this size can be an artefact of the two formulas, not a real difference between the models. If you want a like-for-like comparison, use the same correction method for both.

Raise σ² and the gap widens quickly. With λ = 0 and σ² = 0.6, the back-transform of 25 is 33.747, which is a large adjustment and a reminder that log models with noisy residuals can have means well above their medians.

σ² must be on the transformed scale, and it changes with λ

The residual variance field asks for the variance of the errors after transformation. That number is not portable between values of λ. A variance of 0.15 is modest for a square-root model of values around 25, where transformed values are near 8. It is enormous for a reciprocal model of the same data, where every transformed value is squeezed below 1.

The calculator shows what happens if you forget this. Keep σ² at 0.15 and set λ to −1. The back-transformed mean of 25 jumps into the thousands. The approximation has not broken in its arithmetic. It is being asked about a variance that could not plausibly come from a reciprocal model of these data. At λ = −0.5 the same variance gives 95.313, still far too large.

Enter a variance that fits the scale and the result becomes sensible. With λ = −1 and σ² = 0.0001, the back-transform of 25 is 26.563, a noticeable but believable correction.

The practical rule is to take σ² from the residuals of the model fitted at the same λ you enter here. Never reuse a variance from a model fitted at a different λ, and never use the variance of the original data.

Reading the Jacobian weight of 0.2

The Jacobian line shows y to the power λ − 1, which is the derivative of the transform with respect to y. On the default it is 25 to the power −0.5, or 0.2. In words, near y = 25 a one-unit change in the original data moves the transformed value by about 0.2.

The weight appears in the Box-Cox likelihood. Because the transform stretches and squeezes different parts of the scale, comparing likelihoods across values of λ requires adjusting for that stretching. In the log-likelihood this adjustment is λ − 1 times the sum of ln y over the data. The calculator's description refers to the per-observation term (λ − 1) ln y, and the figure shown is that term exponentiated: the natural log of 0.2 is minus 0.5 times 3.219.

The weight also explains how each λ treats small and large values. With λ = 0.5 a value of 4 has a weight of 0.5, while 25 has 0.2. Small values are spread out and large ones compressed. At λ = 0 the weight on 25 falls to 0.04, so the log compresses large values harder. At λ = 1 the weight is 1 everywhere, because the transform is a straight shift.

On its own, one observation's weight is not a goodness-of-fit measure. It only becomes meaningful when summed over a whole data set inside the likelihood.

Using the back-transform with a model prediction

The calculator applies the bias correction to the transform of the y you enter. Most people, though, start with a prediction from a regression fitted on the transformed scale, not with an original observation. There is no field for that prediction, but there is a simple way to get the answer.

Take the predicted value on the transformed scale and invert it by hand: multiply by λ, add 1, and raise to the power 1 over λ. That gives the naive back-transform. Enter it as y, set λ and σ² to match the model, and the bias-corrected line is the estimated mean on the original scale.

For example, a square-root model that predicts 8 on the transformed scale has a naive back-transform of 25. Entering y = 25 with λ = 0.5 and σ² = 0.15 returns the corrected mean of 25.038.

Which figure to report depends on the purpose. The naive back-transform is a sensible point forecast when you care about the typical value. The corrected mean matters when results will be added up, such as forecasting total sales across many stores, because medians do not sum to a total and means do.

Zero, negative values and the Yeo-Johnson question

Box-Cox is defined only for strictly positive y. Enter 0 or a negative number and the calculator shows an error instead of a result, pointing to the two usual remedies: shift the data by a constant or use the Yeo-Johnson transform. The residual variance field is checked too, and a negative σ² is refused, since no variance can be below zero.

Values between 0 and 1 are fine. y = 1 always transforms to 0 for every λ, and y = 0.5 at λ = 0.5 gives −0.586. Negative transformed values are normal in that range.

If your data contain zeros or negatives, the usual options are adding a constant before transforming or using the Yeo-Johnson transformation, which extends the idea to the whole real line. Despite the page address, this calculator does not compute Yeo-Johnson. For positive data the two are closely related, but they are not identical, and the results here are Box-Cox only.

Adding a constant changes the meaning of λ, so record which constant you used. Results from two shifted data sets cannot be compared directly.