This calculator works out the hyperbolic tangent, tanh(x), for any real number x, showing sinh(x) and cosh(x) alongside so you can see how the result is built. Tanh is defined as sinh(x) divided by cosh(x), the same as (e to the x, minus e to the minus x) over (e to the x, plus e to the minus x). It is an odd function with a smooth S shaped curve that always sits strictly between -1 and 1, flattening out towards those limits as x moves away from zero. This bounded shape is why tanh turns up so often outside pure maths: it is a standard activation function in neural networks, and it appears in physics and engineering problems involving exponential growth and decay, wave equations and electrical transmission lines. To use it, type your value of x into the input box; the result updates instantly, showing tanh(x) as the main figure with sinh(x) and cosh(x) underneath for reference. Results are rounded to six decimal places for display, though the calculation uses full precision. There is no limit on the size or sign of x you can enter, since tanh is defined for every real number, but very large values simply return a result extremely close to -1 or 1. A worked example below confirms tanh(1) is about 0.761594, which you can check by entering 1 above.
The hyperbolic tangent is tanh(x) = sinh(x) / cosh(x) = (e^x - e^-x) / (e^x + e^-x). It is odd and bounded strictly between -1 and 1.
tanh(1) = sinh(1) / cosh(1), about 1.175201 / 1.543081 = 0.761594. Enter 1 above to confirm.
tanh(x) = sinh(x) / cosh(x), or equivalently (e^x - e^-x) / (e^x + e^-x).
It always lies strictly between -1 and 1, approaching -1 for large negative x and 1 for large positive x.
Its smooth, bounded S shape maps any input to a value between -1 and 1, which is useful as a neuron activation function.
This calculator is for students, engineers and machine-learning practitioners working with tanh.
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 by 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-08-15 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.