# Compression Ratio Calculator

> Computes the static compression ratio of a piston engine from bore, stroke, combustion chamber volume and the optional piston dish/dome, deck clearance and head gasket volumes: CR = (swept + clearance) / clearance.

- Calculator id: `compression-ratio` · Category: Engineering & Automotive (`engineering`) · Tool name: `calculate_compression_ratio`
- Canonical page: https://tttkmbb.com/engineering/compression-ratio · This document: https://tttkmbb.com/engineering/compression-ratio.md · JSON definition: https://tttkmbb.com/engineering/compression-ratio.json

## Purpose

Computes the static compression ratio of a piston engine from bore, stroke, combustion chamber volume and the optional piston dish/dome, deck clearance and head gasket volumes: CR = (swept + clearance) / clearance.

**Use when:** You are building or modifying an engine and need the compression ratio after changing heads, pistons, gaskets or deck height.

**Do not use when:** You need dynamic (effective) compression ratio, which depends on intake valve closing timing, or plain displacement (use engine-displacement).

## Input

| Parameter | Type | Unit | Required | Description |
| --- | --- | --- | --- | --- |
| `bore_mm` | number | mm | required | Cylinder bore in millimetres (inches × 25.4). (> 0, max 1000) |
| `stroke_mm` | number | mm | required | Stroke in millimetres. (> 0, max 1000) |
| `chamber_volume_cc` | number | cc | required | Volume of the cylinder-head combustion chamber in cc (from the head specification or by cc-ing the head). (> 0, max 5000) |
| `piston_volume_cc` | number | cc | optional, default 0 | Positive for a dish or valve reliefs (adds clearance volume), negative for a dome, 0 for flat-top. (min -500, max 500) |
| `deck_clearance_mm` | number | mm | optional, default 0 | Distance the piston sits below the block deck at TDC (negative if it protrudes). (min -5, max 20) |
| `head_gasket_thickness_mm` | number | mm | optional, default 0 | Compressed gasket thickness; 0 to ignore the gasket volume. (min 0, max 10) |
| `head_gasket_bore_mm` | number | mm | optional | Gasket opening diameter; defaults to the cylinder bore. (> 0, max 1000) |

## Output

| Field | Type | Unit | Description |
| --- | --- | --- | --- |
| `compression_ratio` | number |  | (swept + clearance) / clearance. |
| `compression_ratio_text` | string |  | Formatted as n:1. |
| `swept_volume_cc` | number | cc | π/4 × bore² × stroke for one cylinder. |
| `deck_volume_cc` | number | cc | π/4 × bore² × deck_clearance. |
| `gasket_volume_cc` | number | cc | π/4 × gasket_bore² × gasket_thickness. |
| `clearance_volume_cc` | number | cc | chamber + piston + deck + gasket volumes: the volume above the piston at TDC. |

## Formula

`swept = π/4 × bore² × stroke; deck_volume = π/4 × bore² × deck_clearance; gasket_volume = π/4 × gasket_bore² × gasket_thickness; clearance = chamber_volume_cc + piston_volume_cc + deck_volume + gasket_volume; compression_ratio = (swept + clearance) / clearance (all volumes in cc)`

Static (geometric) ratio for one cylinder. Effective compression is lower because the intake valve closes after bottom dead centre; pump-fuel engines typically run 8:1–11:1 naturally aspirated and higher with direct injection.

## Data Sources

- Wikipedia – Compression ratio — https://en.wikipedia.org/wiki/Compression_ratio (reference, retrieved 2026-09-24)
- Wikipedia – Engine displacement — https://en.wikipedia.org/wiki/Engine_displacement (reference, retrieved 2026-09-24)

Data freshness: `static`. Deterministic formula with fixed constants; results never go stale. Inputs supplied by the caller determine the output.

## API

- `GET https://tttkmbb.com/api/v1/calculate/compression-ratio?bore_mm=…&stroke_mm=…&chamber_volume_cc=…`
- `POST https://tttkmbb.com/api/v1/calculate/compression-ratio` with JSON body `{"inputs": {…}}`
- Response: unified envelope (`success`, `request`, `result.values`, `result.units`, `sources`, `freshness`, `timestamp`, `next_actions`, `links`); see https://tttkmbb.com/docs/response-format.md
- Schema: https://tttkmbb.com/api/v1/calculators/compression-ratio · OpenAPI operationId `calculate_compression_ratio` in https://tttkmbb.com/openapi.json
- Authentication: none. Rate limit: fair use, see https://tttkmbb.com/docs/rate-limits.md.

## MCP

- Server: `https://tttkmbb.com/mcp` (Streamable HTTP, JSON-RPC 2.0, no auth)
- Tool:  `run_calculator` with `{"calculator_id": "compression-ratio", "inputs": {…}}`

## Example

- 350 SBC: 4.00 × 3.48 in, 64 cc heads, 5 cc reliefs, 0.025 in deck, 0.040 in gasket at 4.100 in: inputs `{"bore_mm":101.6,"stroke_mm":88.392,"chamber_volume_cc":64,"piston_volume_cc":5,"deck_clearance_mm":0.635,"head_gasket_thickness_mm":1.016,"head_gasket_bore_mm":104.14}` → `{"compression_ratio":9.655,"compression_ratio_text":"9.65:1","swept_volume_cc":716.62,"deck_volume_cc":5.148,"gasket_volume_cc":8.654,"clearance_volume_cc":82.802}`
- 86 × 86 mm, 45 cc chamber, 1 mm gasket at 87 mm, flat piston, zero deck: inputs `{"bore_mm":86,"stroke_mm":86,"chamber_volume_cc":45,"head_gasket_thickness_mm":1,"head_gasket_bore_mm":87}` → `{"compression_ratio":10.806,"swept_volume_cc":499.56,"gasket_volume_cc":5.945,"clearance_volume_cc":50.945}`

```
GET https://tttkmbb.com/api/v1/calculate/compression-ratio?bore_mm=101.6&stroke_mm=88.392&chamber_volume_cc=64&piston_volume_cc=5&deck_clearance_mm=0.635&head_gasket_thickness_mm=1.016&head_gasket_bore_mm=104.14
```

## Limitations

You need dynamic (effective) compression ratio, which depends on intake valve closing timing, or plain displacement (use engine-displacement). Static (geometric) ratio for one cylinder. Effective compression is lower because the intake valve closes after bottom dead centre; pump-fuel engines typically run 8:1–11:1 naturally aspirated and higher with direct injection. All values are computed from the formula above; no measurement or live data is involved.

## FAQ

**How do I get the chamber volume?**

From the cylinder-head specification, or measure it by filling the chamber with liquid from a burette (cc-ing) with the valves and spark plug installed.

**Does a thicker head gasket lower compression?**

Yes: it adds clearance volume. Each 0.25 mm (0.010 in) of gasket on a 100 mm bore adds about 2 cc, roughly 0.2 points of ratio on a 10:1 engine.

## Related

- [Engine Displacement Calculator](https://tttkmbb.com/engineering/engine-displacement.md) — Total displacement from the same bore and stroke.
- [Cylinder Calculator](https://tttkmbb.com/geometry/cylinder.md) — Cylinder volume geometry.
- [Ideal Gas Law Calculator](https://tttkmbb.com/chemistry/ideal-gas-law.md) — Pressure rise of the compressed charge.
