TL;DR
Newton is a free, open-source math problem solver API. Provide a math expression and an operation, and it returns the simplified result. Supported operations include arithmetic, algebra (simplify, factor, derive, integrate), trigonometry, logarithms, and more. Simply encode the expression and operation type in the URL. JSON responses include the original operation, expression, and result. No API key, no rate limits. Indispensable for educational tools, homework helpers, and calculation engines.
Quick start: https://newton.now.sh/api/v2/derive/x%5E2-3x
No API key needed — just make a request!
How to Use This API
1. Derive a Function
https://newton.now.sh/api/v2/derive/x%5E2-3x
2. Integrate an Expression
https://newton.now.sh/api/v2/integrate/2x%5E3
3. Simplify an Expression
https://newton.now.sh/api/v2/simplify/2x%5E2+3x%5E2
4. JavaScript — Math Calculator
async function mathSolve(op, expr) {
const url = `https://newton.now.sh/api/v2/${op}/${encodeURIComponent(expr)}`;
const data = await fetch(url).then(r => r.json());
return data.result;
}
mathSolve('derive', 'x^2-3x').then(r => console.log('Derivative:', r));
mathSolve('integrate', '2x^3').then(r => console.log('Integral:', r));
mathSolve('simplify', '2x^2+3x^2').then(r => console.log('Simplified:', r));
5. Python — Batch Calculus
import requests
problems = [
('derive', 'sin(x)'),
('integrate', 'cos(x)'),
('simplify', '(x^2+2x+1)/(x+1)'),
('factor', 'x^2-4'),
]
for op, expr in problems:
data = requests.get(
f'https://newton.now.sh/api/v2/{op}/{expr}'
).json()
print(f"{op}({expr}) = {data['result']}")
https://newton.now.sh/api/v2/derive/x%5E2-3x
Frequently Asked Questions
- What operations are supported?
- simplify, factor, derive, integrate, zeroes (roots), tangent, area under curve, cosine, sine, tangent, inverse cosine, inverse sine, inverse tangent, absolute value, logarithm, and more.
- How do I pass expressions with special characters?
- URL-encode the expression. Spaces become %20, exponents use ^, and parentheses should be encoded. Many common operations work without full encoding.
- What is the expression syntax?
- Standard algebraic notation: x^2 for x², sin(x) for sine, log(x) for natural log, sqrt(x) for square root. Use parentheses for grouping.
- Can I solve equations?
- Yes, use the
zeroesoperation to find equation roots and thetangentoperation to find tangent lines at specific points. - Does it support implicit multiplication?
- Yes, 2x is treated as 2*x. Use explicit operators for complex expressions to avoid ambiguity.
- Is there a rate limit?
- Newton is open-source and free with no rate limits. You can also self-host it from the GitHub repository.
API Details
- API URL
https://newton.now.sh/api/v2- Documentation
- github.com/aunyks/newton-api
- Category
- Science
- Authentication
- Not Required
- Geographic Coverage
- Global
What You Can Build
- Interactive calculus learning app showing step-by-step derivations
- Homework helper that solves and explains math problems in real-time
- Physics simulation engine using the derivative/integral endpoints
- Graphing calculator companion that computes symbolic derivatives
- Math worksheet generator with auto-solved answer keys for teachers