# Geotechnical Calculator: Bearing Capacity, Walls, Slopes (`jumblemog/geotechnical-calculator`) Actor

Soil bearing capacity and settlement of footings, retaining wall stability and slope stability (Bishop) from plain text: Terzaghi, Meyerhof, Vesic, Eurocode 7, Rankine and Coulomb, with charts.

- **URL**: https://apify.com/jumblemog/geotechnical-calculator.md
- **Developed by:** [Jumble Mog](https://apify.com/jumblemog) (community)
- **Categories:** AI, Automation, Developer tools
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

Pay per event

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

## Geotechnical Calculator: Bearing Capacity, Walls, Slopes

**Soil bearing capacity, retaining walls and slope stability from one line of text.** Type `square footing 2 m, 1 m deep, sand phi 32, load 1200 kN, water table 2 m`, `cantilever retaining wall 5 m high, backfill phi 30, surcharge 10 kPa` or `slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20`. You get back:

- **Footings**: ultimate and allowable bearing pressure by Vesic, Terzaghi, Meyerhof, Hansen or Eurocode 7 Annex D, with every factor (N, shape, depth, inclination), the water table, eccentric and inclined loads, the capacity in kN or kips, and the utilization of your load. Leave the width out and it finds the smallest footing that works.
- **Settlement**: immediate elastic settlement under the footing, and consolidation of clay layers below it (Cc, Cr, OCR or preconsolidation pressure) with the time to 50% and 90%.
- **Eurocode 7**: the design resistance by Design Approach 1 Combination 2 and Design Approach 2.
- **Retaining walls**: cantilever or gravity walls; Rankine or Coulomb active pressure with sloping backfill, surcharge, cohesion and water; overturning, sliding and bearing factors of safety, the eccentricity and toe and heel pressures, and the stem's shear and moment. Leave the base out and it sizes it.
- **Slopes**: Bishop's simplified method on circular slip surfaces with a search for the critical circle, layered soils, a water table or ru, crest surcharge and seismic kh, with Fellenius for comparison; and the infinite slope.
- **A chart**: the footing, wall or slope drawn to scale, next to the bearing pressure curve, the factors of safety, or the map of slip circles searched.

Metric (m, kN, kPa, kN/m³) or US (ft, kips, psf, pcf): results come back in the units you wrote. Soil words like `dense sand` or `stiff clay` fill in typical values when you have no test results.

It's made for:

- Geotechnical and structural engineers doing quick checks and preliminary sizing.
- Civil engineering students working foundation and slope problems.
- Builders, architects and estimators who need a first idea of footing and wall sizes.
- AI agents that need real soil mechanics instead of a guess.

![The ACADS benchmark slope analyzed by this Actor: a 10 m high 2:1 slope with the critical slip circle and its 30 slices shaded, at factor of safety 0.987 by Bishop's method, next to a heat map of the lowest factor of safety for each circle centre in the search grid](https://api.apify.com/v2/key-value-stores/Km5b4PG3kYHdZSb1E/records/geotechnical-calculator-example.png?signature=VPxaYByHPNqpB3P2tFun)

### How to use it

1. Write **Footings, walls and slopes**, one per entry. The form has examples.
2. Optionally set the **Units** for numbers written without one.
3. Click **Start**. Each request is a row in the results, with its summary, chart and report.

#### Writing a footing

| You write | It means |
|---|---|
| `2 m square`, `1.5 x 2.5 m`, `1.2 m wide strip`, `3 m diameter circular` | The footing (a strip is per metre or foot of length) |
| `design a square footing for 800 kN` | Find the width for the load |
| `1 m deep`, `D = 3 ft` | Embedment depth |
| `phi 32`, `c 10 kPa`, `su 60 kPa`, `gamma 18 kN/m3`, `120 pcf` | Soil strength and unit weight (su means undrained, φ = 0) |
| `dense sand`, `soft clay`, `gravel` | Typical values for that soil |
| `water table 2 m`, `water table at the surface` | Depth of the water table below ground |
| `load 1200 kN`, `250 kN/m`, `150 kips` | The vertical load |
| `horizontal load 40 kN`, `moment 300 kNm`, `e = 0.2 m` | Inclined or eccentric loading |
| `Terzaghi`, `Meyerhof`, `Hansen`, `Vesic`, `EC7` | The method (Vesic by default) |
| `FS 2.5` | Factor of safety (3 by default) |
| `E 25 MPa`, `nu 0.3` | For the elastic settlement |
| `clay layer 4 m thick at 5 m depth, Cc 0.35, e0 0.95, cv 1.5 m2/yr` | Consolidation settlement and time |

#### Writing a wall

| You write | It means |
|---|---|
| `cantilever retaining wall 5 m high`, `gravity wall 3 m high` | The wall and its height from the underside of the base |
| `base 3.5 m, toe 0.8 m, stem 0.3/0.5 m, base 0.5 m thick` | Cantilever dimensions (leave the base out to size it) |
| `top 0.5 m, base 1.8 m` | Gravity wall top and base widths |
| `backfill phi 30, gamma 18`, `backfill slope 10°`, `surcharge 10 kPa` | The retained soil |
| `foundation soil phi 28, c 10 kPa` | The soil under the base |
| `front soil 1 m`, `passive` | Soil in front of the toe, and counting its passive resistance |
| `water table 2 m below the top`, `kh 0.1`, `Coulomb` | Water, seismic coefficient, method |

#### Writing a slope

| You write | It means |
|---|---|
| `slope 10 m high at 2:1`, `at 30°`, `1V:2H` | Height and angle |
| `c 10 kPa, phi 25, gamma 19` or `soft clay` | One soil |
| `water table 4 m above the toe`, `ru 0.2`, `saturated` | Pore pressure |
| `surcharge 20 kPa`, `kh 0.15`, `rock 5 m below the toe` | Crest load, seismic coefficient, a layer circles can't pass |
| `infinite slope 25°, 2 m deep, phi 32, saturated` | A planar slip parallel to the surface |

Layered slopes go as an object: `{"type": "slope", "h": "12 m", "ratio": 2, "layers": [{"thickness": "6 m", "c": 20, "phi": 25, "gamma": 19}, {"c": 40, "phi": 0, "gamma": 18}], "water": "4 m"}` (layers from the top down, elevations from the toe).

### Examples

- `square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa` → qult 1,018 kPa, qallow 339 kPa; 300 kPa applied: OK (88%); settlement about 23 mm.
- `design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep` → B = 1.5 m.
- `cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa` → base 5.7 m; FS overturning 8.2, sliding 1.50, bearing 3.75.
- `slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20` → FS 0.987 by Bishop (the ACADS benchmark's 0.99).
- `infinite slope 25 degrees, 2 m deep, phi 32, c 0, gamma 19, saturated` → FS 0.65.

### How-to examples

Each example is a complete input; the results are from runs of the Actor (also listed under **Examples**).

#### How to calculate the bearing capacity and settlement of a footing

```json
{"requests": ["square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa"]}
```

Result: qult 1,018 kPa and qallow 339 kPa; the 300 kPa applied is OK at 88%, and settlement is about 23 mm. `design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep` gives B = 1.5 m.

#### How to check a cantilever retaining wall for overturning, sliding and bearing

```json
{"requests": ["cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa"]}
```

Result: a 5.7 m base, with FS 8.2 against overturning, 1.50 against sliding and 3.75 on bearing.

#### How to find the factor of safety of a slope (Bishop's method)

```json
{"requests": ["slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20", "infinite slope 25 degrees, 2 m deep, phi 32, c 0, gamma 19, saturated"]}
```

Result: FS 0.987 by Bishop, against the ACADS benchmark's 0.99; the saturated infinite slope has FS 0.65.

#### How to let an AI agent do geotechnical checks

Add this Actor to the [Apify MCP server](https://mcp.apify.com) with `https://mcp.apify.com/?tools=jumblemog/geotechnical-calculator`. The agent passes the footing, wall or slope as one line and answers with the capacity, the factors of safety and the settlement, each with the formula's inputs.

### FAQ

**Which methods does it use?** Bearing capacity with each method's shape, depth and inclination factors and Das's water table cases; Steinbrenner and consolidation settlement; Rankine and Coulomb wall pressures; Bishop's simplified method for slopes, with Fellenius on the same circle.

**What if I don't have soil test values?** It uses typical values and says so in the notes. Give φ, c or su and γ from tests for design.

**Does it handle layered soil?** Consolidation layers below a footing, yes; a strong layer over a weak one for bearing capacity, no. Slopes take horizontal layers and a horizontal water table.

**Is it a substitute for a geotechnical engineer?** No. Results are engineering estimates for the stated assumptions; a geotechnical engineer should check designs against site investigation data and the local code.

### Input

| Field | What it is |
|---|---|
| `requests` | The footings, walls and slopes, as lines of text or objects (up to 200 per run) |
| `units` | For numbers without a unit: `m` or `ft` |
| `charts` | Draw a chart for each request (default on) |

### Output

One dataset item per request, also saved together in the run's `OUTPUT` record:

```json
{
  "request": 1, "status": "ok", "type": "footing", "title": "Footing 2 m square at 1 m",
  "summary": "qult 1,018 kPa, qallow 339.3 (FS 3, Vesic); applied 300: OK (88%); settlement ≈ 23.04 mm.",
  "bearing": {"method": "vesic", "nc": 35.49, "nq": 23.18, "ngamma": 30.21,
              "shape": {"c": 1.653, "q": 1.625, "gamma": 0.6}, "depth": {"c": 1.2, "q": 1.138, "gamma": 1.0},
              "overburden": 18.0, "gammaEffective": 13.59, "terms": {"cohesion": 0.0, "surcharge": 771.5, "weight": 246.5},
              "qult": 1018.0, "qnet": 999.9, "fs": 3.0, "qallow": 339.3, "capacity": 1357.0},
  "load": {"vertical": 1200.0, "pressure": 300.0, "utilization": 0.8841, "fsActual": 3.393},
  "imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/001-Footing-2-m-square-at-1-m.png"
}
```

Footings also have `footing`, `soil`, `settlement` and `ec7`; walls have `wall`, `soil`, `earthPressure`, `forces`, `stability` and `stem`; slopes have `slope`, `layers` and `critical` (or `infinite`). Every item has `units`, `summary`, `warnings`, `notes` (the method and assumptions), a Markdown `report` and links to the chart and report. A request that can't be computed has `"status": "failed"` and the reason in `error`, and isn't billed.

### How it works

1. **Bearing capacity**: qult = c·Nc·sc·dc·ic + q·Nq·sq·dq·iq + ½·γ'·B'·Nγ·sγ·dγ·iγ with each method's factors; B' = B − 2e for eccentric loads; the water table changes q and γ' by Das's three cases.
2. **Settlement**: Steinbrenner's influence factor at the centre of a flexible footing (rigid ≈ 0.8 of it); consolidation by Cc and Cr over 10 sublayers per clay layer with the load spread at 2:1; Terzaghi's time factors.
3. **Walls**: active pressure integrated over the height (soil, surcharge, cohesion with a tension crack, water), on the vertical plane through the heel (cantilever, Rankine) or on the wall's back (gravity, Coulomb with δ = ⅔φ); weights and moments about the toe; sliding resistance V·tan(⅔φ₂) + B·⅔c₂; bearing by Meyerhof with the effective width and load inclination.
4. **Slopes**: Bishop's simplified method with 30 slices on circles from a grid of centres and depths, refined twice around the lowest; pore pressure from the water table or ru; Fellenius on the same circle.

Results are engineering estimates for the stated assumptions; a geotechnical engineer should check designs against site investigation data and the local code.

### Pricing

You pay one low price per request, at the prices shown on this page: footings and walls cost less than slopes, which search hundreds of slip circles. The chart and report are included. Requests that can't be computed are never charged. If you set a maximum cost per run, the Actor stops before a request that wouldn't fit.

### Speed

A footing or wall takes a few milliseconds, a slope about a second. A run through the API answers in about 10 to 20 seconds, including the cloud container starting.

### Tips and limits

- **Typical soil values** are starting points; the notes say when they were used. Give φ, c or su and γ from tests for design.
- **Footings** are on one soil to a depth of about 2B; layered bearing capacity (a strong layer over a weak one) isn't modelled, but consolidation layers below are.
- **Walls** assume no drainage when you give a water table (full water pressure and uplift); most walls are drained, so leave the water out for a drained wall. Sliding without a shear key or passive resistance often sets the base width.
- **Slopes** use circular surfaces only (no wedges or non-circular searches), a horizontal water table and horizontal layers; check that the critical circle isn't on the edge of the search (the result warns).
- **Limits**: 200 requests per run.

### For AI agents and developers

This Actor works with the [Apify MCP server](https://mcp.apify.com), so AI agents can call it as a tool. Pass `requests` as plain text and read `summary`, `bearing`, `stability`, `critical` and `warnings`. A direct API call that waits for the answer:

```bash
curl -X POST "https://api.apify.com/v2/acts/jumblemog~geotechnical-calculator/run-sync-get-dataset-items?token=YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"requests": ["square footing 2 m, 1 m deep, sand phi 32, load 1200 kN"]}'
```

`run-sync` instead returns the run's `OUTPUT`: the status, the counts and every result as JSON.

In Python, with the `apify-client` package:

```python
from apify_client import ApifyClient

client = ApifyClient("YOUR_TOKEN")
run = client.actor("jumblemog/geotechnical-calculator").call(run_input={
    "requests": [{"type": "footing", "shape": "square", "load": "800 kN", "d": "1 m", "phi": 34, "gamma": 19,
                  "design": True, "es": "40 MPa"}],
})
for item in client.dataset(run["defaultDatasetId"]).iterate_items():
    print(item["summary"])
```

### Credits

- Geometry: [Shapely](https://github.com/shapely/shapely) (BSD-3-Clause) and [NumPy](https://numpy.org) (BSD-3-Clause).
- Charts: [Vega-Lite](https://vega.github.io/vega-lite/) and [vl-convert](https://github.com/vega/vl-convert) (BSD-3-Clause), with the [Inter](https://rsms.me/inter/) font (SIL Open Font License).
- Methods: Das, *Principles of Foundation Engineering*; Bowles, *Foundation Analysis and Design*; Coduto, *Foundation Design*; EN 1997-1:2004 Annex D; Bishop (1955), *The use of the slip circle in the stability analysis of slopes*; Donald and Giam (1989), the ACADS slope stability benchmarks.

# Actor input Schema

## `requests` (type: `array`):

One footing, retaining wall or slope per entry, as a line of text or an object. Footings: size ('2 m square', '1.5 x 2.5 m', '1.2 m wide strip', '3 m diameter circular'; leave it out or write 'design' to size it for the load), depth ('1 m deep'), soil (phi, c or su, gamma, or a word like 'dense sand' or 'stiff clay'), water table depth, load, horizontal load, moment or eccentricity, FS (default 3), method (Vesic default, Terzaghi, Meyerhof, Hansen, EC7), E and ν for settlement, and a clay layer for consolidation ('clay layer 4 m thick at 5 m depth, Cc 0.35, e0 0.95, cv 1.5 m2/yr'). Walls: 'cantilever' or 'gravity', height, base, toe, stem, base thickness (or leave the base out to size it), backfill phi, c, gamma, slope and surcharge, 'foundation soil phi 28, c 10 kPa', front soil depth, 'passive', water table depth, kh, Rankine or Coulomb. Slopes: height, angle ('30°') or ratio ('2:1'), soil or layers, water table elevation above the toe, ru, crest surcharge, kh, a hard layer below the toe; 'infinite slope 25°, 2 m deep' for planar slips. Object fields: type (footing, wall or slope), shape, b, l, d, phi, c, gamma, gammaSat, water, load, h, moment, e, fs, method, es, nu, clay, soil; kind, base, toe, stemTop, stemBottom, baseThickness, beta, q, delta, phi2, c2, gamma2, df, passive, kh; angle, ratio, layers (thickness or bottom, phi, c or su, gamma), ru, hard, infinite, saturated, depth; units, title, text.

## `units` (type: `string`):

For numbers written without a unit. Feet, psf, pcf or kips in the text switch to US units on their own.

## `charts` (type: `boolean`):

Each footing, wall or slope drawn to scale, next to the bearing pressure curve, the factors of safety, or the search grid of slip circles.

## Actor input object example

```json
{
  "requests": [
    "square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa",
    "design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep",
    "cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa",
    "slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20",
    {
      "type": "slope",
      "h": "12 m",
      "ratio": 2,
      "layers": [
        {
          "thickness": "6 m",
          "c": 20,
          "phi": 25,
          "gamma": 19
        },
        {
          "c": 40,
          "phi": 0,
          "gamma": 18
        }
      ],
      "water": "4 m"
    }
  ],
  "units": "m",
  "charts": true
}
```

# Actor output Schema

## `results` (type: `string`):

One row per request: the summary and chart.

## `output` (type: `string`):

The OUTPUT record: every result in one JSON object.

## `files` (type: `string`):

Charts (PNG and SVG) and Markdown reports in the run's key-value store.

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "requests": [
        "square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa",
        "design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep",
        "cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa",
        "slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20",
        {
            "type": "slope",
            "h": "12 m",
            "ratio": 2,
            "layers": [
                {
                    "thickness": "6 m",
                    "c": 20,
                    "phi": 25,
                    "gamma": 19
                },
                {
                    "c": 40,
                    "phi": 0,
                    "gamma": 18
                }
            ],
            "water": "4 m"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("jumblemog/geotechnical-calculator").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "requests": [
        "square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa",
        "design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep",
        "cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa",
        "slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20",
        {
            "type": "slope",
            "h": "12 m",
            "ratio": 2,
            "layers": [
                {
                    "thickness": "6 m",
                    "c": 20,
                    "phi": 25,
                    "gamma": 19,
                },
                {
                    "c": 40,
                    "phi": 0,
                    "gamma": 18,
                },
            ],
            "water": "4 m",
        },
    ] }

# Run the Actor and wait for it to finish
run = client.actor("jumblemog/geotechnical-calculator").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "requests": [
    "square footing 2 m, 1 m deep, sand phi 32, gamma 18 kN/m3, load 1200 kN, water table 2 m, E 25 MPa",
    "design a strip footing for 250 kN/m on clay su 75 kPa, 1 m deep",
    "cantilever retaining wall 5 m high, backfill phi 30, gamma 18 kN/m3, surcharge 10 kPa",
    "slope 10 m high at 2:1, c 3 kPa, phi 19.6, gamma 20",
    {
      "type": "slope",
      "h": "12 m",
      "ratio": 2,
      "layers": [
        {
          "thickness": "6 m",
          "c": 20,
          "phi": 25,
          "gamma": 19
        },
        {
          "c": 40,
          "phi": 0,
          "gamma": 18
        }
      ],
      "water": "4 m"
    }
  ]
}' |
apify call jumblemog/geotechnical-calculator --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,jumblemog/geotechnical-calculator"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/AvmBobaFy62issRUa/builds/eIc0N3kuGmzCu0Aev/openapi.json
