This original example uses A = 2 ft 10 3/8 in and B = 1 ft 4 7/8 in. Addition should give 4 ft 3 1/4 in. Subtracting B from A should give 1 ft 5 1/2 in. The trace below shows where the carries and reduced fractions come from.

Enter feet, inches, and eighths separately
Each operand has three fields: whole feet, whole inches, and the numerator of an inch fraction whose denominator is fixed at eight. For A, enter 2, 10, and 3. For B, enter 1, 4, and 7. The numerator field is labeled eighths of an inch, so a 3 there cannot be mistaken for three whole inches.
The bounded example accepts whole feet from 0 through 100, whole inches from 0 through 11, and eighth numerators from 0 through 7. Every field requires an explicit integer, including zero. A blank is missing input. These are the input rules of this example, not a general limit on how lengths can be written.
CalculatorSoup documents compound feet/inches arithmetic and the relationship of twelve inches to one foot. Its calculator accepts broader formats and operations; this example uses a smaller fixed-field addition/subtraction design. Feet and inches calculator
Convert each length to integer ticks
Call one eighth of an inch a tick. An inch contains eight ticks, and a foot contains 12 × 8 = 96 ticks. For each operand, calculate:
ticks = 96 × feet + 8 × whole inches + eighth numerator
| Operand | Tick calculation | Total ticks |
|---|---|---|
| A | 96 × 2 + 8 × 10 + 3 | 275 |
| B | 96 × 1 + 8 × 4 + 7 | 135 |
The tick counts preserve the supplied eighths exactly in this bounded integer model. They do not establish that an actual object was measured exactly, or that a result includes a cutting allowance or a fit tolerance. Keep the input record attached to the arithmetic answer so that distinction stays visible.
Add, then carry back into feet and inches
The sum is 275 + 135 = 410 ticks. Take out whole feet first: four feet use 384 ticks, leaving 26. Three whole inches use 24 more ticks, leaving two eighths. Reduce 2/8 to 1/4.
The result is 4 ft 3 1/4 in. You can also verify it by ordinary compound addition: the two fractions total 10/8, giving one extra inch and 2/8. The whole inches then total 10 + 4 + 1 = 15, which carry into one extra foot and three inches. Combined with the original three feet, that gives four feet.
This cross-check is useful when the displayed answer looks surprisingly larger than the sum of the feet fields. The extra foot came from carried inches, not an unexplained rounding adjustment.
Subtract without scattering negative signs
For A − B, the tick difference is 275 − 135 = 140. One foot uses 96 ticks, leaving 44. Five inches use 40 ticks, leaving four eighths, which reduce to 1/2. The result is 1 ft 5 1/2 in.
For B − A, the difference is −140 ticks. Decompose the absolute magnitude in the same way, then apply one minus sign to the entire compound result: −(1 ft 5 1/2 in). The parentheses make the scope clear. Do not display a mix such as negative feet plus positive leftover inches that a reader must reinterpret.
If the difference is zero, display 0 ft 0 in with no negative sign and no 0/8 fraction. For any nonzero remainder, reduce the numerator and denominator by their greatest common divisor. The fixed eighth input can therefore produce a final half, quarter, or eighth. The exact result stays primary; any optional decimal display must identify its units and any rounding.
Keep the answer tied to the current six fields
Choose Add, A − B, or B − A in the local workbench, then use Compute or Reset. Before Compute, validate all six fields. Reject a fractional field entry, negative operand component, text, nonfinite number, or value outside the stated limits. Do not silently carry an entered 12-inch field or clamp it to 11; ask for input in the declared format.
An input or operation change clears the current derived answer until recomputed. Invalid input clears the tick trace and compound result so an earlier valid answer cannot appear to answer the new entry. Reset restores the two original operands and Addition, clears derived output, and waits for Compute.
The output bounds can exceed the operand bounds. Two allowed 100-foot operands can add to more than 100 feet. The input limit should not truncate a valid computed sum. The local workbench illustrates these conditions with supplied numbers; it does not record an actual measurement.
Copyable compound-length preparation prompt
Prepare an original feet-and-inches addition/subtraction workbench specification and complete calculation worksheet. Return readable text, not executable code or HTML. Do not report an actual measurement or working calculator.
Give A and B separately labeled whole-feet, whole-inches, and eighth-inch numerator fields. The denominator is fixed at 8. Require explicit integer values, including zero. Accept feet 0-100, inches 0-11, and numerator 0-7 for each operand. Reject missing, nonnumeric, nonfinite, fractional, negative, or out-of-range field entries without clamping or blank-to-zero conversion.
Use original A = 2 ft 10 3/8 in and B = 1 ft 4 7/8 in. Compute integer ticks as 96*feet + 8*inches + numerator. Show A=275 ticks and B=135 ticks.
Provide operation choices Addition, A-B, and B-A. Verify 410 ticks gives 4 ft 3 1/4 in, 140 ticks gives 1 ft 5 1/2 in, and -140 ticks gives -(1 ft 5 1/2 in). Decompose absolute ticks into whole feet, whole inches, and remaining eighths, then apply a single global sign. Reduce nonzero fractions using their greatest common divisor. Display zero without a negative sign or zero fraction.
Show both operands, selected operation, integer trace, and exact compound result together. Do not round before carrying. An optional decimal view must label units and any rounding; it must not replace the exact result. Do not apply the operand input bounds as a cap on computed output.
Specify Compute and Reset. Editing an operand or operation clears current derived output until Compute. Invalid input clears the previous answer and trace. Reset restores the original operands, selects Addition, clears derived output, and waits for Compute.
Include pending acceptance checks for fraction reduction, 12-inch carry, zero, reversed subtraction, all six field boundaries, stale-answer clearing, keyboard access, focus, and narrow layout. Keep supplied arithmetic separate from measurement accuracy, construction fit, cutting allowance, tolerance, and safety. Do not add arbitrary mixed-number parsing, multiplication, division, or metric conversion.
A separate view of the prepared worksheet
Keep the six input fields and exact tick trace as the main record. NOS offers HTML saving and rendering as a separate place to view a prepared workbench. Check its actual carries, signs, validation, and Reset behavior before relying on its displayed answer.
An answer you can audit shows where every carried foot, whole inch, and reduced fraction came from.