Fraction Calculator
Open Fraction Calculator on Happytails.ai. This view has the same page content and links, with explicit tool capabilities. Read the processing notes before using a tool.
Tool capabilities
{
"id": "fractions",
"category": "calculators",
"built": true,
"requirements": "Exact rational arithmetic and mixed-number simplification.",
"implementation": {
"fields": [
{
"key": "a",
"label": "Numerator A",
"value": 1,
"type": "number",
"min": -1000000,
"max": 1000000,
"step": 1
},
{
"key": "b",
"label": "Denominator A",
"value": 2,
"type": "number",
"min": -1000000,
"max": 1000000,
"step": 1
},
{
"key": "op",
"label": "Operation",
"value": "+",
"type": "select",
"values": [
"+",
"-",
"×",
"÷"
]
},
{
"key": "c",
"label": "Numerator B",
"value": 1,
"type": "number",
"min": -1000000,
"max": 1000000,
"step": 1
},
{
"key": "d",
"label": "Denominator B",
"value": 3,
"type": "number",
"min": -1000000,
"max": 1000000,
"step": 1
}
],
"input": false,
"live": true,
"presentation": "metrics",
"note": "The reduced fraction is exact. Mixed numbers show the same value; the decimal is approximate.",
"experience": {
"automatic": true,
"single": false,
"inputMaxLength": 1000000,
"inputMode": "text",
"label": "Your text",
"placeholder": "Type or paste your input…",
"help": "Change the input or settings to update your result. Results update as you type. Up to 1,000,000 characters.",
"helpParts": [
"Change the input or settings to update your result.",
"Results update as you type.",
"Up to 1,000,000 characters."
],
"action": null
},
"mode": "automatic",
"interactive": false
},
"execution": "POST /api/v1/tools/fractions/run",
"api": {
"id": "fractions",
"name": "Fractions",
"category": "calculators",
"description": "Add, subtract, multiply, or divide two fractions.",
"notes": "The reduced fraction is exact. Mixed numbers show the same value; the decimal is approximate.",
"human_path": "/en/calculators/fractions/",
"method": "POST",
"endpoint": "/api/v1/tools/fractions/run",
"schema_url": "/api/v1/tools/fractions",
"input_schema": {
"type": "object",
"additionalProperties": false,
"properties": {
"input": {
"type": "string",
"maxLength": 1000000,
"default": "",
"description": "Plain text input. File tools use files instead unless otherwise documented."
},
"options": {
"type": "object",
"additionalProperties": false,
"properties": {
"a": {
"type": "number",
"description": "Numerator A",
"default": 1.0,
"minimum": -1000000,
"maximum": 1000000,
"multipleOf": 1
},
"b": {
"type": "number",
"description": "Denominator A",
"default": 2.0,
"minimum": -1000000,
"maximum": 1000000,
"multipleOf": 1
},
"op": {
"type": "string",
"description": "Operation",
"default": "+",
"enum": [
"+",
"-",
"×",
"÷"
]
},
"c": {
"type": "number",
"description": "Numerator B",
"default": 1.0,
"minimum": -1000000,
"maximum": 1000000,
"multipleOf": 1
},
"d": {
"type": "number",
"description": "Denominator B",
"default": 3.0,
"minimum": -1000000,
"maximum": 1000000,
"multipleOf": 1
}
}
}
}
},
"output_schema": {
"type": "object",
"required": [
"tool",
"result"
],
"properties": {
"tool": {
"type": "string"
},
"result": {
"type": "object",
"required": [
"text",
"files"
],
"properties": {
"text": {
"type": [
"string",
"null"
]
},
"data": {
"description": "Parsed JSON when the textual result is JSON."
},
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"files": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"mime",
"bytes",
"base64"
],
"properties": {
"name": {
"type": "string"
},
"mime": {
"type": "string"
},
"bytes": {
"type": "integer"
},
"base64": {
"type": "string",
"contentEncoding": "base64"
}
}
}
}
}
}
}
},
"processing": "Server; same transformation code as browser tools",
"limits": {
"request_bytes": 8388608,
"input_characters": 1000000,
"files_bytes": 5242880,
"max_files": 0,
"timeout_seconds": 12
}
},
"agent_processing": "Server; same transformation code as browser tools",
"browser_agent": {
"supported": true,
"name": "run_current_tool",
"discovery": "WebMCP on the human page in a supporting browser",
"verification": "See audit/API-AUDIT.md; availability is not verification"
}
}Page guide
Add, subtract, multiply, or divide two fractions.
How to use Fractions
- Enter the values you want to calculate and choose the relevant units or settings.
- The result updates as you type. Adjust the available settings if needed.
- Review the result, then use Copy result or a download link when available.
How Fractions works
Enter two fractions as whole-number numerators and denominators, choose add, subtract, multiply or divide, and the calculator returns the exact result reduced to lowest terms, the same value as a signed mixed number, and a decimal approximation. It works with integer arithmetic: addition uses a/b + c/d = (ad + cb)/bd, then divides top and bottom by their greatest common divisor. Each number must be a whole number from −1,000,000 to 1,000,000, denominators cannot be zero, and dividing by a fraction equal to zero is undefined.
Before you start
Convert any mixed number to an improper fraction first, for example 1 1/2 becomes 3/2. To work with a whole number, enter it over 1.
A worked example
1/2 + 3/4 gives the reduced fraction 5/4, the mixed number 1 1/4 and the decimal 1.25. Entering 3/4 − 5/6 returns −1/12, about −0.0833.
What to expect
Add, subtract, multiply, or divide two fractions. Enter whole-number numerators and nonzero denominators from −1,000,000 to 1,000,000. The result shows a reduced fraction, a signed mixed number and a decimal approximation. Dividing by a zero-valued fraction is undefined. Processing stays on your device.
Common questions
How do you add fractions with different denominators?
Rewrite both fractions over a common denominator, add the numerators, then simplify. For 1/2 + 1/3, use sixths: 3/6 + 2/6 = 5/6. The calculator multiplies across, a/b + c/d = (ad + cb)/bd, and then reduces the result by the greatest common divisor.
How do you divide fractions?
Multiply the first fraction by the reciprocal of the second. 1/2 ÷ 3/4 becomes 1/2 × 4/3 = 4/6, which reduces to 2/3. Dividing by a fraction whose numerator is 0 is undefined, so the tool shows an error instead of a result.
Can I enter mixed numbers or decimals?
Not directly. Every field takes a whole number, so 1.5 is rejected. Convert a mixed number to an improper fraction by multiplying the whole part by the denominator and adding the numerator: 2 3/4 becomes 11/4. A decimal like 0.75 can be entered as 75/100 or 3/4.
What happens with negative fractions?
You can put a minus sign on a numerator or a denominator. The result always moves the sign to the numerator and keeps the denominator positive, so 1/−2 + 1/3 gives −1/6. Negative mixed numbers are shown with the sign in front, such as −1 2/3.
Why is the decimal only approximate?
Many fractions, such as 1/3 or 5/6, have decimal forms that repeat forever, so any decimal shown has to stop somewhere. The reduced fraction is the exact answer. Use it when precision matters and treat the decimal as a convenient estimate.