This hyperbolic tangent calculator returns tanh(x) for any real number x, with sinh(x) and cosh(x) shown alongside. The hyperbolic tangent is the ratio tanh(x) = sinh(x) / cosh(x), which also equals (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, S shaped function that always stays between -1 and 1, approaching those limits as x heads to large negative or positive values. Because of that bounded S shape, tanh is widely used as an activation function in neural networks, as well as in physics and engineering. Enter a value of x and read the result, rounded for display. The definition, a worked example and the assumptions are set out below.
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.
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-06-21 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.