Statistics & probability

Ordinary kriging calculator with an entered variogram model

Each sample row contains planar x, planar y, and one observed value.

Your numbers

Calculated on your device. Your inputs aren’t sent to us.

Your result

Ready when you are

Enter your inputs and select Calculate.

Report an issue

Behind the numbers

How this calculation works

Each sample row contains planar x, planar y, and one observed value. Query rows contain planar x and y only. All coordinates must use the same projected units, and sample locations must be distinct. The calculator accepts three through one hundred samples and one through one hundred queries. It does not convert latitude and longitude into a projection or choose a distance metric automatically.

THE FORMULA[Γ 1;1ᵀ 0][w;η]=[γ(query);1]; prediction=wᵀz; kriging variance=wᵀγ(query)+η; γ(0)=0 under exact point-value convention.

A worked example

Square-corner values10,14,12,16 yield center prediction13, weights1/4 each and spherical-model variance2.538936983.

Good to know

3–100 distinct planar sample points, 1–100 query points, supplied valid spherical or exponential semivariogram parameters (positive partial sill/range, nonnegative nugget). Explicit point-prediction nugget convention, stationary unknown mean and common projected units. Solve full global system with conditioning/residual checks; no variogram fitting, block/universal/co-kriging, geographic coordinates or covariance-parameter uncertainty.

Enter projected sample and query coordinates

Each sample row contains planar x, planar y, and one observed value. Query rows contain planar x and y only. All coordinates must use the same projected units, and sample locations must be distinct. The calculator accepts three through one hundred samples and one through one hundred queries. It does not convert latitude and longitude into a projection or choose a distance metric automatically.

The supplied semivariogram describes spatial variation of the quantity being predicted. Choosing its parameters is an external modeling task. Enter a positive partial sill and positive range parameter with a nonnegative nugget, then select spherical or exponential form. A visually smooth prediction is not evidence that the entered covariance structure matches the process, and this page does not estimate parameters from the sample.

Symmetric sample geometry gives equal center weightsSpherical model, range 3, partial sill 410141216Query (1,1)Four equal weights: 1/4Prediction = 13Variance ≈ 2.538937Coordinates use common projected units; nugget = 0.
Scroll across to see the full diagram.
The model determines the error variance; observed values determine the weighted prediction.

Compare this with the Empirical directional variogram calculator from spatial coordinates and values. Solves unbiased unknown-constant-mean kriging equations with sum(weights)=1 and reports prediction variance. Empirical variogram explicitly excludes prediction; existing GP is a zero-mean squared-exponential conditioner, not unknown-mean ordinary kriging.

Ordinary kriging estimates an unknown constant mean

The predictor is a weighted sum of the observed values. Its weights sum to one, making it unbiased for an unknown constant mean under the model. Among such linear predictors, ordinary kriging chooses weights to minimize the model-based prediction-error variance. The weights depend on locations, the query, and the semivariogram, rather than only on inverse distance to the query.

Some legitimate weights can be negative. This is not necessarily a numerical fault and should not be silently truncated to zero, because doing so changes the constrained optimum. The model assumes a suitable stationary residual structure and a common unknown mean. A trend, anisotropy, or multiple correlated variables would require a different kriging formulation rather than being absorbed automatically by the global ordinary-kriging solve.

Solve the augmented semivariogram system

The matrix contains pairwise sample semivariogram values and a final row and column of ones enforcing the weight sum. The query right-hand side contains semivariogram values from each sample to the query and a final one. Solving returns the weights and a Lagrange multiplier. Prediction is the weighted data sum; variance is weight dot query-semivariogram plus that multiplier under this sign convention.

The spherical structured component uses 1.5u minus 0.5u cubed for u below one and equals one thereafter, with u equal to distance divided by range. The exponential component uses one minus exp(-distance/range), so its range is an e-folding parameter, not the spherical finite sill distance. State the parameter convention rather than comparing the two range inputs as identical physical cutoffs.

Four corner measurements predict the center

The default sample square has locations (0,0), (2,0), (0,2), and (2,2) with values 10, 14, 12, and 16. The query is its center (1,1). With zero nugget, partial sill four, and spherical range three, symmetry makes all four query distances equal and gives each sample weight one quarter.

The center prediction is therefore 13. An independent augmented-system solve gives Lagrange multiplier approximately minus 0.079977021 and prediction-error variance approximately 2.538936983. The square symmetry makes the mean easy to verify by hand, while the variance still checks the semivariogram and multiplier convention. Changing the measured values changes this prediction but does not change these weights or the model-based variance at the fixed geometry.

Read weights separately from uncertainty

The figure marks the four samples, center query, and equal contributing weights for the default. Connections show which sample values enter the predictor; they are not physical flow paths or evidence of causation. A sample farther away can still receive substantial or negative weight in a different configuration because the full pairwise covariance structure determines redundancy among all samples.

A kriging variance depends on sample geometry and the specified model, rather than on whether the observed values happen to lie close to a fitted surface. Its square root is a model-based prediction-error standard deviation. It excludes uncertainty about estimated variogram parameters and does not automatically supply a calibrated empirical prediction interval, particularly when normality or the stationary structure is doubtful.

Declare what the nugget represents

This page uses the point-process semivariogram convention: gamma at an identical location is zero, while positive separation includes the nugget. With an exact query at an observed sample, that convention targets the same point value and yields interpolation under a well-conditioned solve. A separate measurement-error or latent-smooth-signal target can require a different covariance right-hand side and uncertainty interpretation.

Duplicate samples are rejected rather than averaged automatically. Near duplicates, extreme ranges, and nearly singular systems require residual and conditioning checks. A failed solve should not be replaced by arbitrary stabilized weights without disclosure. The tool does not fit a variogram, select neighborhoods, propagate parameter uncertainty, or supply block, universal, or co-kriging. Those are distinct models with different constraints and prediction targets.

Compare model-based prediction with exploratory tools

An empirical variogram summarizes observed squared increments by distance bin and can help investigate a model. It does not by itself compute kriging predictions. Inverse-distance weighting forms a geometric average without a supplied stochastic semivariogram and generally lacks this model-based error variance. Ordinary kriging connects a specified dependence model with an unbiased linear prediction, so its additional assumptions must accompany its additional output.

Retain projected units, sample values and order, query locations, model family, nugget meaning, partial sill, range convention, weights, residual checks, predictions, and variances. Examine sensitivity to plausible parameter choices before relying on the surface. A precise numerical solve is a check of the entered mathematical system; it cannot establish that an unknown physical field truly follows that spatial model at unobserved locations.

A few questions, answered

What does range mean for the exponential model?

It is the e-folding distance in exp(-h/range), not a finite distance at which the sill is reached.

Can I use longitude and latitude directly?

No. Supply a common planar projection and consistent distance units.

Why can a kriging weight be negative?

The full dependence model accounts for redundancy among samples. Negative weights can satisfy the constrained optimum and are not automatically errors.

Does the variance include fitted-parameter uncertainty?

No. It conditions on the entered semivariogram and excludes uncertainty about its parameters.

Find your calculator

Start typing to explore the library.