Model flows between places using masses and distance. Tune exponents, constants, and decay settings easily. Download results, compare scenarios, and understand sensitivities clearly fast.
The gravity model estimates interaction between two locations using mass terms and a distance penalty. Choose a distance impedance that fits your use case.
Sample inputs below use default parameters (K=1, α=1, β=1, γ=2). Values illustrate how distance reduces interaction.
| Case | M1 | M2 | D | Expected Trend |
|---|---|---|---|---|
| A | 1,000,000 | 750,000 | 250 | Baseline interaction at moderate distance |
| B | 1,200,000 | 600,000 | 180 | Higher M1 and shorter distance increase flow |
| C | 900,000 | 900,000 | 320 | Larger distance reduces flow despite strong masses |
The gravity model estimates interaction between two places as a function of “mass” and separation. In practice, mass can be population, GDP, jobs, student enrollment, or store demand. If M1 doubles while other terms stay fixed and α=1, predicted flow doubles. If α=0.7, doubling M1 increases flow by about 62%.
Distance impedance is the main behavioral choice. A power decay divides by (D+ε)^γ and is common when long-range links still matter. Typical γ values range from 1.0 to 3.5. An exponential decay multiplies by exp(−λ(D+ε)), producing faster drop‑off; λ often sits between 0.01 and 0.20 per distance unit.
K sets the baseline level of interaction after unit choices. α and β are constant elasticities with respect to M1 and M2, so they are directly comparable across scenarios. Under power decay, distance elasticity is −γ, meaning γ=2 implies a 1% distance increase reduces flow by roughly 2%. Under exponential decay, elasticity equals −λ(D+ε), so effects strengthen as distance grows.
The scale factor reports T/scale, which is convenient for “per 1,000 trips” or “per million dollars.” Use ε when D can be near zero or when minimum travel friction exists; ε=5 can represent local access costs. Compare two scenarios by holding masses fixed and varying γ or λ; a small change from γ=1.8 to 2.0 can materially reduce long-distance predictions.
Batch mode processes many rows of (M1,M2,D) and outputs Flow, Scaled Flow, and ln(Flow). The log value is useful for regression workflows because ln(T)=ln(K)+αln(M1)+βln(M2)−γln(D+ε) under power decay. For stable estimates, include wide ranges of masses and distances, and avoid rows with zero masses.
Start with realistic units: kilometers with λ near 0.02–0.08 often yields moderate decay, while miles may need different λ. Validate against observed flows by checking median absolute percentage error and outliers. If the model overpredicts nearby flows, increase ε or reduce K. If it underpredicts long trips, lower γ or λ and reassess. Document assumptions, then rerun the graph to confirm sensitivity before publishing final scenario outputs.
Use any comparable size measures: population, GDP, jobs, demand, or capacity. Keep units consistent across rows so changes in α and β reflect real sensitivity, not unit shifts.
Power decay fits situations where long-distance interactions still occur, because the tail decreases gradually. Exponential decay fits settings with strong friction, where flows drop rapidly as distance rises.
They are elasticities. If α=0.8, a 10% increase in M1 raises predicted flow by about 8%, holding other inputs fixed. The same interpretation applies to β and M2.
ε prevents unstable results when D is near zero and can represent fixed local friction, like access time. It shifts all distances to D+ε, making short-distance predictions less extreme.
It does not change the underlying T; it changes how results are reported. For example, scale=1000 reports “thousands of units,” making values easier to read and compare.
Compare predicted flows to observed data. Check median absolute percentage error, inspect outliers, and adjust K and decay parameters. Use batch mode to test many pairs and verify distance patterns visually.
Important Note: All the Calculators listed in this site are for educational purpose only and we do not guarentee the accuracy of results. Please do consult with other sources as well.