Composite Function Calculator (Linear)

This composite function calculator works out f(g(x)) for two linear functions, showing you both the resulting composite function and its value at a point you choose. Composition means applying one function to the output of another: you first work out g(x), then feed that answer into f. Enter the coefficients for f(x) = ax + b, the coefficients for g(x) = cx + d, and the x value you want to evaluate. The calculator instantly returns the composite function f(g(x)) written in simplified ax + b form, since composing two linear functions always produces another linear function whose slope is the product of the two original slopes. Alongside that you get two worked figures: the value of g(x) at your chosen x, and the value of f(g(x)) at that same x, so you can see each step of the working rather than just the final answer. This makes the tool handy for checking algebra homework, verifying working done by hand, or building intuition for how composition behaves before moving on to quadratic or other non-linear examples. Keep in mind that order matters: f(g(x)) is generally not the same as g(f(x)), so track carefully which function gets applied first. The calculator assumes you enter valid numeric coefficients and rounds results for display, so treat tiny differences in the decimals as rounding rather than a mistake in your own working.

Calculate.co.nz is proud to be partnered with Premium Homes, a recognised leader in eco-friendly, sustainable, and energy-efficient homebuilding. With a dedicated team and award-winning experience, they create homes that prioritise health, comfort, and long-term performance. Their founders, Andrew and Kelly, set out to raise the standard of residential construction in New Zealand by combining practical building expertise with a clear commitment to doing things better for homeowners.
Calculate.co.nz partner: Premium Homes
 
f(g(x)) value at x 
g(x) at x 

The formula

For f(x) = ax + b and g(x) = cx + d, the composite is f(g(x)) = a(cx + d) + b = (ac)x + (ad + b). Apply g first, then f. In general f(g(x)) is not equal to g(f(x)).

Worked example

For f(x) = 2x + 1 and g(x) = 3x + 4, f(g(x)) = 2(3x + 4) + 1 = 6x + 9. At x = 1, g(1) = 7 and f(7) = 15. Enter 2, 1, 3, 4, 1 to confirm.

Frequently asked questions

What does f(g(x)) mean?

Apply g to x first, then apply f to the result. It is read f of g of x.

Is composition commutative?

No. In general f(g(x)) is different from g(f(x)); the order of composition matters.

Is the composite of two linear functions linear?

Yes. The composite is linear too, with slope equal to the product of the two slopes.

Who this calculator is for

This calculator is for algebra students and anyone needing a quick, reliable result.

What this calculator assumes

  • You enter valid numbers.
  • The standard method is applied.
  • Results are rounded for display.

Formula and sources

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-19 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.