ForHosting KIT · Engineering & construction

Blocks in contact force calculator

Pushing a 4 kg block with 20 N against a 6 kg block gives both an acceleration of 2 m/s² and a contact force of 12 N between them. Enter both masses and the push to see each step. 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
M1
4
M2
6
Force
20
You get
Mass1
4
Mass2
6
F
20
Total mass
10

A blocks in contact force calculator turns the classic two-block push problem into a reliable solver for homework, labs, and quick design checks. Enter the mass of the driven block m1, the mass of the front block m2, and the external force F applied to m1 toward m2 in one consistent unit system, and the tool returns the shared system acceleration, the contact force between the blocks, fully substituted equations, and ordered step strings you can paste into worksheets or automated tests. The model is ideal: a frictionless horizontal surface and rigid contact so both blocks accelerate together with a equal to F divided by the total mass, while the contact force on m2 equals m2 times that acceleration.

What two blocks in contact mean and which formulas apply

Two blocks in contact on a horizontal surface form one of the first multi-body problems students meet after Newton’s second law. An external force F is applied to the rear block m1 so that it pushes the front block m2; if the surface is frictionless and the blocks remain in rigid contact, they share a single acceleration a. Treating the pair as a free body gives net force F equal to total mass times a, so a equals F divided by m1 plus m2.

Free-body analysis on the front block alone then shows that only the contact force accelerates m2, so the contact force Fc equals m2 times a, or equivalently F times m2 over the total mass. Free-body analysis on the rear block shows F minus Fc equals m1 times a, which is algebraically consistent. Callers keep m1, m2, and F in one coherent unit system—for example kilograms and newtons—so that a comes out in metres per second squared and Fc in newtons of that system.

The calculator does not model friction, rope tension, inclined planes, or three-body stacks; those extensions need different equations and different inputs.

Practical tips, limits, and related searches

Use one consistent unit system end to end before calling; this landing does not convert between SI and imperial units. When teaching free-body diagrams, derive a from the combined system and Fc from the front block first, then confirm the numeric result here. This page targets people searching for a blocks in contact force calculator, two-block contact force solver, or acceleration of blocks pushed together online; it is not a full multi-body dynamics suite, not an Atwood pulley model, and not a unit converter.

Prefer this capability when you already know the two masses and the applied force and only need ideal shared acceleration and contact force; if your source problem includes kinetic friction, subtract friction from F or remodel with separate free bodies before calling. Round-trip checks are easy: recompute F over total mass by hand and confirm it equals the published a within the same twelve-decimal rounding used in the response.

Homework checks for two-block push problems

Students enter m1, m2, and F from textbook contact problems and compare shared acceleration, contact force, and substitution steps against a deterministic result before submitting.

Lab pre-check before sensor runs

Pipelines compute the ideal a and contact force first, then compare against force-sensor data to quantify friction and compliance as residual error.

Which block receives the external force?

The external force is applied to m1. The contact force returned is the force that m1 exerts on m2 (equal in magnitude to what accelerates m2).

What happens when total mass is zero?

If m1 + m2 is zero, acceleration is undefined.

Does this include friction or an inclined surface?

No. The ideal model assumes a frictionless horizontal surface and rigid contact. Friction or incline problems need different free-body equations.

Is the blocks in contact force calculator free?

The browser tool is free and runs locally.

What is the contact force when 20 N pushes 4 kg against 6 kg?

The contact force is 12 N. Both blocks accelerate at 2 m/s², the push divided by the total mass of 10 kg, and the front 6 kg block needs 12 N to share that acceleration.

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/mech/two-block-contact-force

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/mech/two-block-contact-force \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"m1":4,"m2":6,"force":20}'
{
  "m1": 4,
  "m2": 6,
  "force": 20
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "mech.two_block_contact_force",
  "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.

Total mass zero is rejected with a clear invalid_input error so bad forms never invent a number. Pricing is a flat $0.002 per successful API request; failed validation is never charged.

What two blocks in contact mean and which formulas apply

Masses must be non-negative finite scalars; if both masses are zero the total mass is zero and acceleration is undefined, so the calculator rejects that case with invalid_input.

How to call the API and what comes back

Absolute values must stay within the published limit of one trillion; each mass must be non-negative; the sum m1 plus m2 must be strictly positive. Send a JSON body with the three required finite fields m1 (aliases mass1 and m_1), m2 (aliases mass2 and m_2), and force (aliases F, f, and applied_force). Failed validation—missing fields, non-finite numbers, values outside absolute limits, negative mass, or zero total mass—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item. Prefer JSON numbers when you control the client; string numbers are accepted only when they match a strict finite numeric pattern for homework-form paste paths.

Practical tips, limits, and related searches

Keep m1, m2, and F inside the published absolute range so products and quotients remain finite in IEEE double precision on the Worker and in the browser. Pair classroom examples deliberately: m1 equals four, m2 equals six, and F equals twenty yields a equal to two and contact force equal to twelve; m1 equals two, m2 equals three, and F equals ten yields a equal to two and contact force equal to six; deliberately zero total mass demonstrates the hard invalid_input path. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners deliberately pass zero total mass.

Unit tests for physics helpers

Generate known-good acceleration and contact-force cases plus deliberate zero-total-mass rejections for coding kata expected values in simulators or games.

What formulas does the blocks in contact force calculator use?

For two blocks on a frictionless surface with F applied to m1 toward m2 it uses a = F / (m1 + m2) for shared acceleration and contact_force = F · m2 / (m1 + m2) for the force on m2.

Read the full KIT documentation →