ForHosting KIT · Science

Principal stress calculator

With 80 on the x-face, 20 on the y-face and a shear of 40, the principal stresses are 100 and 0. Enter the two normal stresses and the in-plane shear in one unit to get σ1 and σ2 of a plane-stress element. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Sigma x
80
Sigma y
20
Tau xy
40
You get
Sigma 1
100
Sigma 2
0

Principal stresses are the algebraically largest and smallest normal stresses that act on a material element after it is rotated until the in-plane shear vanishes. For a plane-stress state those two values follow from three finite numbers: the normal stress on the x-face, the normal stress on the y-face, and the in-plane shear.

What principal stresses are

Any point in a loaded part carries a normal stress on each face and a shear stress along them, and those values change as you turn the small square element you are looking at. Turn it far enough and the shear on its faces disappears. The two normal stresses left on the faces at that angle are the principal stresses: σ1 is the algebraically largest and σ2 the smallest, the extreme values the element experiences. Mathematically they are the eigenvalues of the two-by-two stress matrix, with the two normal stresses on the diagonal and the shear off it. Knowing both shows the real extremes the material is under.

How the result is worked out, and the usual slips

The calculation takes the average of the two normal stresses and adds or subtracts a radius: the square root of half their difference squared plus the shear squared. With 80 on the x-face, 20 on the y-face and a shear of 40, the average is 50 and the radius is 50, so the principals are 100 and 0. Typical mistakes are mixing units, such as one value in megapascals and another in psi, forgetting the sign convention that makes tension positive and compression negative, and using the full difference instead of half of it. Equal normal stresses with no shear are not an error: both principals simply equal that value.

What happens if a stress component is not a finite number?

Missing values, empty strings, NaN, and Infinity are rejected and are not billed.

Which units can I use for the stresses?

Any coherent stress unit, such as megapascals or pounds per square inch, as long as all three values use the same one. The principal stresses come back in that same unit.

How do I enter a compressive stress?

As a negative number. The calculator follows the usual sign convention, with tension positive and compression negative, for both normal stresses.

What if the shear stress is zero?

That is a valid uniaxial or hydrostatic state. The faces are already principal, so the two normal stresses are the principals; if they are also equal, both principals take that same value.

Is σ1 always the larger principal stress?

Yes. σ1 is the algebraically largest normal stress and σ2 the smallest. With compression involved, σ2 can be negative and larger in size than σ1, but it is still the smaller number.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/phys/principal-stress

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/phys/principal-stress \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"sigma_x":80,"sigma_y":20,"tau_xy":40}'
{
  "sigma_x": 80,
  "sigma_y": 20,
  "tau_xy": 40
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "phys.principal_stress",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

This principal stress calculator evaluates the closed-form identity that sigma_1 and sigma_2 equal the average of the two normals plus or minus the square root of half the normal difference squared plus the shear squared, and it returns both principals as structured JSON. Missing, empty, infinite, or non-numeric components fail with invalid_input instead of emitting a silent NaN.

What principal stresses mean for a plane-stress state

Principal stresses are the extreme normal stresses that appear when that element is rotated until shear on the faces is zero. They are the eigenvalues of the two-by-two stress matrix whose diagonals are the two normals and whose off-diagonal is the shear. When the two normals are equal and shear vanishes, both principals collapse to that hydrostatic value and the element is already in principal orientation — that is a valid input, not an error. Units are yours — megapascals, pounds per square inch, or any coherent stress unit — as long as all three components share that unit; the output uses the same unit. A plane-stress state on a material element is specified by two normal stresses and one in-plane shear: sigma_x on the x-face, sigma_y on the y-face, and tau_xy. The closed-form solution used by every mechanics-of-materials textbook is therefore an average plus or minus a radius: sigma_1 and sigma_2 equal (sigma_x plus sigma_y) divided by two, plus or minus the square root of ((sigma_x minus sigma_y) over two) squared plus tau_xy squared. The algebraically larger root is reported as sigma_1 and the algebraically smaller root as sigma_2, so clients never have to sort the pair. Search queries such as principal stress calculator, plane stress principals, and sigma 1 sigma 2 from shear want those two numbers as JSON, not a reminder that a Mohr circle exists as a drawing aid. This endpoint solves the invariants only: it does not plot a circle, does not introduce a third out-of-plane principal of zero, and does not compute von Mises or Tresca equivalent stress. Delivering sigma_x, sigma_y, tau_xy, sigma_1, sigma_2, and formula as JSON makes the result easy to paste into notes, diff in automated tests, or reuse across languages without reimplementing the square-root arithmetic.

Input contract, response shape, and error behaviour

There is no extra domain restriction: compression (negative normals), tension, zero shear, and negative shear are all legal finite stress states. Results are rounded to twelve decimal places so goldens compare byte-for-byte across JavaScript engines; minus-zero is normalised to zero. POST a JSON body with three required finite numbers: sigma_x, the normal stress on the x-face; sigma_y, the normal stress on the y-face; and tau_xy, the in-plane shear that acts with them. Each field may arrive as a JSON number or as a numeric string so forms and CSV-style pipelines can pass values without an extra cast. Missing fields, empty strings, non-numeric text, NaN, and Infinity all fail immediately with invalid_input that names the offending field, and failed validation is not billed. After validation the engine computes the average of sigma_x and sigma_y, the Mohr-equivalent radius as the Euclidean combination of half the normal difference and tau_xy, then sigma_1 as that average plus the radius and sigma_2 as that average minus the radius. The success body echoes the three inputs and returns sigma_1, sigma_2, and a formula string restating the identity. Example: sigma_x equals eighty, sigma_y equals twenty, tau_xy equals forty yields principals one hundred and zero — the classic 3-4-5 right triangle of the two-dimensional stress transformation. Pair the response with your own plotting code if you need a sketch of the element or of Mohr's circle; this endpoint reports both principals only and does not emit images or step-by-step drafting prose beyond the formula field. The same pure function powers the free in-browser tool and the API path, so homework checks and production pipelines never disagree on a floating-point edge case.

Where a principal-stress API earns its keep, limits, and pricing

Exam-prep generators need a deterministic oracle that rejects a non-finite component instead of silently returning NaN that a buggy grader might treat as success. Units are yours as long as all three components share one coherent stress unit. Failed validation does not consume balance. Classrooms and tutoring platforms use a principal stress calculator so learners can check both principals for arbitrary sigma_x, sigma_y, and tau_xy without mixing the half-angle identities by hand. Strain-gauge reductions, weld and shaft checks, and finite-element snapshots often collapse a two-dimensional tensor to the same three components; calling a tiny parse API avoids pulling a full computer-algebra or continuum-mechanics library for an eigenvalue problem that has a closed form. Sign convention follows the usual continuum-mechanics two-dimensional tensor: the principal values do not depend on which textbook draws shear positive-up or positive-down on a Mohr diagram, because those values come from the invariants and tau_xy enters only as a square. This calculator reports the in-plane principals only; it does not introduce a third out-of-plane principal of zero, does not compute von Mises or Tresca equivalent stress, and does not rotate a three-dimensional tensor. Keep requests small, pin the rounded principals in tests, and you get reproducible sigma_1 and sigma_2 for homework, LMS plugins, and edge workers without standing up symbolic math infrastructure of your own.

Classroom and homework checks

Let students submit sigma_x, sigma_y, and tau_xy and verify both principal stresses against the 2D transformation identities in a mechanics-of-materials textbook.

Exam and LMS auto-grading

Mark plane-stress principal items with a deterministic oracle that rejects non-finite components as invalid_input and never invents a NaN success payload.

Strain-gauge and FE snapshot reduction

Collapse a plane-stress tensor to sigma_1 and sigma_2 in notebooks and design helpers without importing a full continuum-mechanics library.

How do I get both principal stresses from a plane-stress state?

Send finite numbers sigma_x, sigma_y, and tau_xy. The API returns sigma_1 = avg + R and sigma_2 = avg − R, where avg = (sigma_x+sigma_y)/2 and R = sqrt(((sigma_x−sigma_y)/2)^2 + tau_xy^2).

Which value is sigma_1 and which is sigma_2?

sigma_1 is always the algebraically larger principal and sigma_2 the algebraically smaller, so you never sort the pair. Equal normals with zero shear is valid: both principals equal that hydrostatic value.

Does the sign of tau_xy change the principal values?

No. Principal stresses depend on tau_xy squared, so reversing shear leaves sigma_1 and sigma_2 unchanged. The orientation of the principal planes would reverse, but this calculator reports the two principal values only.

What does the principal stress calculator cost?

The browser tool is free. API requests use prepaid KIT balance at $0.002 per successful call; invalid input is not billed.

Read the full KIT documentation →