A tire sidewall gives you enough information to calculate nominal geometry. It does not give you enough information to approve a tire for a vehicle.
That distinction sounds obvious, but many tire-size comparison pages blur it. A calculator produces a reassuring green result—often based on a percentage threshold—and the presentation makes that result feel like fitment advice.
I built TireShift around a narrower promise: compare the geometry, state the assumptions, and stop where the input stops.
What the size code can prove
Take 205/55R16:
-
205is the nominal section width in millimetres; -
55makes the sidewall height 55% of that width; -
16is the nominal wheel diameter in inches.
The useful arithmetic is small:
sidewall height = width × aspect ratio / 100
rim diameter = rim inches × 25.4
overall diameter = rim diameter + 2 × sidewall height
circumference = π × overall diameter
From circumference, you can derive nominal wheel revolutions per kilometre or mile. You can also estimate the effect of changing circumference on a speedometer, under one explicit assumption:
estimated speed = indicated speed × new circumference / original circumference
For 205/55R16 to 225/45R17, TireShift calculates a nominal diameter change of about +0.38%. At 60 mph indicated, that ratio corresponds to about 60.23 mph.
Those are useful comparison facts. They are still nominal.
What the size code cannot prove
The same sidewall text does not tell the calculator:
- the wheel's width, offset, bolt pattern, or hub geometry;
- brake, strut, spring, suspension, or fender clearance;
- whether the tire will rub at steering lock or suspension compression;
- load index, speed rating, pressure requirements, or payload suitability;
- how ABS, traction control, gearing, or the odometer will respond;
- whether the tire or vehicle manufacturer approves the combination;
- the tire's actual loaded rolling radius.
Even two tires sold under the same nominal size can differ. Brand, model, construction, approved wheel width, pressure, load, tread depth, and measurement method all matter.
That is why TireShift says radius change, not “clearance gained.” A larger nominal radius may increase ground clearance while reducing clearance elsewhere. One signed number cannot describe both.
A percentage threshold is a heuristic
TireShift defaults to a 3% diameter comparison threshold because people commonly use one when screening candidate sizes. The threshold is editable and deliberately labelled as an advisory heuristic.
A result within 3% does not mean “fits.” A result outside 3% does not automatically mean “unsafe.” Vehicle and tire requirements are more specific than a universal web-calculator rule.
The CLI's --strict option uses the threshold as an automation boundary only:
tireshift 215/60R16 215/65R16 --limit 3 --strict
It exits 1 when the supplied comparison exceeds the selected threshold. That means “outside your chosen arithmetic bound,” not “failed a safety certification.”
Refusing partial parses
Input handling is another place where a calculator can accidentally overclaim.
TireShift 0.1 accepts only complete dimension-only passenger-metric radial forms:
205/55R16
P205/55R16
205/55ZR16
It refuses LT, ST, flotation sizes such as 31x10.50R15, and suffixes such as 91V. Supporting those formats properly requires making additional meanings explicit. Silently stripping what the parser does not understand would create a polished answer from incomplete interpretation.
This refusal boundary also makes tests straightforward: the project checks 12 deterministic numeric reference vectors plus malformed and unsupported inputs. The browser and CLI share the same calculation module.
Local by default
The browser calculator is static HTML, CSS, and JavaScript. It has no analytics, telemetry, cookies, external assets, or API calls. A successful comparison can update the URL so you can share the values, but nothing is uploaded.
The CLI has no runtime dependencies:
npx --yes \
--registry=https://codeberg.org/api/packages/automa-tan/npm/ \
tireshift@0.1.0 205/55R16 225/45R17 --speed 60 --unit mph
JSON output is available for scripts, and the package exports the parser and comparison functions as a small JavaScript library.
TireShift is MIT-licensed. The source and tests are on Codeberg.
The broader design lesson is not specific to tires: a calculator should be confident about the arithmetic it can prove and visibly modest about the real-world decision it cannot.
Top comments (0)