Definite Integral Calculator

This calculator evaluates a definite integral of any function you enter over bounds a and b, using Simpson's rule with a precision you can adjust. A definite integral measures the net signed area between a curve and the x-axis over a closed interval. Positive area accumulates where the function sits above the axis; negative area where it dips below. The result is a single number representing that total. Definite integrals appear in virtually every branch of mathematics, physics and engineering: calculating distance from a velocity function, finding total energy from a power curve, computing cumulative probability from a continuous distribution, or working out the volume of a solid of revolution. Symbolic (exact) integration is only possible for certain function families, but numerical methods handle almost any smooth expression. Simpson's rule approximates each segment of the curve with a parabola, making it significantly more accurate than rectangular or trapezoidal methods for the same number of evaluations. You type the function (for example sin(x), x*x or exp(-x*x)), set the lower bound a and upper bound b, and choose the number of subintervals (the default is 100; set it higher for oscillating or steeply curved functions). The step size h is shown so you can assess the granularity of the approximation. The calculator also displays the midpoint value of the function and the interval width, giving you a quick sanity check. Results are numerical approximations suited to students, scientists and engineers who need a reliable quick value. Always verify critical results against a symbolic solution where one exists.

Calculate.co.nz is proud to be partnered with realtor.co.nz, a trusted resource for navigating the New Zealand property market. Their Helpful Articles section offers clear, well-structured insights across buying, selling, and building, making complex real estate topics more accessible. With a focus on up-to-date guidance and practical knowledge, they empower Kiwis to move forward with clarity and confidence in a constantly evolving property landscape.
Calculate.co.nz partner: realtor.co.nz
2.0000
ab f(x) dx
Interval width3.1416
Step size h0.0314
f(midpoint)1.0000

Use PI in your bounds field to enter pi (3.14159...). Enter expressions using standard Math functions: sin, cos, exp, log, sqrt.

How it works

Simpson's rule divides [a, b] into n even subintervals of width h = (b − a) / n. The approximation is (h / 3) × [f(a) + 4f(x1) + 2f(x2) + 4f(x3) + ... + 4f(x_n-1) + f(b)]. Interior points alternate between coefficients 4 and 2. The formula's error term is proportional to (b − a) × h to the power of four, divided by 180, times the maximum of the fourth derivative of f on the interval. With 100 subintervals this is extremely small for typical smooth functions. If you enter an odd number of subintervals the calculator rounds up to the nearest even number automatically.

Worked example

Integrate f(x) = sin(x) from 0 to pi (3.14159265358979) with 100 subintervals. The exact antiderivative is −cos(x), so the exact value is −cos(pi) − (−cos(0)) = 1 − (−1) = 2.0000. The calculator returns 2.0000, the interval width is pi (approximately 3.1416), h is about 0.0314, and the midpoint is pi/2 where sin equals 1. These match the default values pre-filled above.

Related calculators

If you've found a bug, or would like to contact us, or learn more about James Graham and Calculate.co.nz.

Calculate.co.nz is partnered with Interest.co.nz for New Zealand's highest quality calculators and financial analysis.

Calculate.co.nz is the sister site of CalculatorHub.com, the world's largest calculator website by tool count.

All calculators and tools are provided for educational and indicative purposes only and do not constitute financial advice.

Calculate.co.nz is proudly part of the Realtor.co.nz group, New Zealand's leading property transaction literacy platform, helping Kiwis understand the home buying and selling process from start to finish. Whether you're a first home buyer navigating your first property purchase, an investor evaluating your next acquisition, or a homeowner planning to sell, Realtor.co.nz provides clear, independent, and trustworthy guidance on every step of the New Zealand property transaction journey.

Calculate.co.nz is also partnered with Health Based Building and Premium Homes to promote informed choices that lead to better long-term outcomes for Kiwi households.

Calculate.co.nz is hosted in Auckland via SiteHost new Zealand.

All content on this website, including calculators, tools, source code, and design, is protected under the Copyright Act 1994 (New Zealand). No part of this site may be reproduced, copied, distributed, stored, or used in any form without prior written permission from the owner.

About & trust: Why Calculate is NZ's most comprehensive · By the Numbers · How we compare · Editorial standards · How we keep data current · NZ finance glossary · Research & data · Financial literacy NZ · About · Privacy policy · Terms of use

Reviewed and maintained. Last reviewed 2026-07-02 and checked on a twice-monthly cycle against IRD, RBNZ and Stats NZ. How we keep data current.

© 2026 Calculate.co.nz. All rights reserved. Building free NZ calculators since 2011.