Modified Duration Calculator
This tool calculates Macaulay and Modified duration for standard fixed-rate bonds and estimates Effective duration using a price-shift numerical method. Duration measures a bond's sensitivity to small, parallel changes in yield and is used for interest-rate risk management.
Two modes are provided: a formula-based Macaulay→Modified route (requires yield-to-maturity and bond specs) and a price-shift effective-duration route (useful for bonds with embedded options or when cash-flow sensitivity is unknown). The calculator reports intermediate values (model clean price, Macaulay duration in years) to support validation and audit.
Governance
Record 5e8d08fe2d7c • Reviewed by Fidamen Standards Committee
Calculates Macaulay duration from a fixed schedule of level coupon payments using yield-to-maturity and converts to Modified duration using the chosen compounding frequency.
Inputs
Advanced inputs
Bond specifications
Yield inputs (used by Macaulay/Modified method)
Price-shift inputs (used by Effective Duration)
Results
Model clean price
-$9,035.00
Macaulay duration (years)
—
Modified duration
—
| Output | Value | Unit |
|---|---|---|
| Model clean price | -$9,035.00 | USD |
| Macaulay duration (years) | — | years |
| Modified duration | — | years |
Visualization
Methodology
Macaulay duration is the weighted average time to receive the bond's cash flows where weights are present-value fractions. Modified duration adjusts Macaulay by the periodic yield to estimate percent price change per unit yield change under small, parallel shifts.
Effective duration is computed numerically by observing model or market price changes to small yield perturbations and is preferred when cash flows change with yield (for callable, convertible, or prepayable instruments).
Numerical and rounding behavior follows IEEE 754 floating point conventions for predictable results. Quality control and traceability recommendations reference ISO and NIST guidance on measurement uncertainty and software quality management.
Key takeaways
Use the Macaulay→Modified mode for standard fixed-cash-flow bonds when you know the yield. Use the price-shift mode to estimate effective duration for instruments with yield-dependent cash flows.
Document inputs (day-count, Δy, price type), validate with test vectors, and be aware of linear approximation limits. Follow IEEE numeric practices and ISO/NIST recommendations for QA and traceability.
Worked examples
Example 1 (standard): 5-year bond, 5% annual coupon, semiannual payments, face 1000, YTM 4.5% → compute model price, Macaulay and Modified durations. Use Macaulay→Modified mode.
Example 2 (embedded option): For a callable bond, run a valuation model to obtain P0, P(+Δy), and P(-Δy) then use the price-shift mode to estimate effective duration.
F.A.Q.
When should I use Modified duration versus Effective duration?
Use Modified duration for plain-vanilla fixed-rate bonds with fixed cash flows. Use Effective duration for bonds whose cash flows change with yield (callable, puttable, convertible, mortgage-backed).
What size of Δy should I use for price-shift effective duration?
Choose a small absolute shift (for example 1–10 basis points = 0.0001–0.001) so linear approximation holds but large enough to avoid numerical noise. Report Δy when saving results.
Does this calculator handle day-count conventions and accrued interest?
This tool uses simple period counts (payments per year) for duration formulas. Accrued interest and detailed day-count adjustments are informational; include those adjustments externally when using market clean/dirty prices.
How accurate are the results and what are the limitations?
Results assume level periodic coupons and parallel yield shifts. Modified duration is a linear approximation and ignores convexity; effective duration accounts for nonlinearity if proper shifted prices are provided. Numerical rounding follows IEEE floating-point; document test vectors and error tolerances when using results for regulatory reporting.
Is there guidance for testing and quality control?
Validate the implementation with known analytic test cases, check convergence for numerical solvers, record input snapshots, and follow ISO 9001 quality practices and NIST measurement uncertainty guidance for traceability.
Sources & citations
- NIST Risk Management and Measurement Guidance — https://www.nist.gov/topics/risk-management
- ISO — Quality and Management Standards — https://www.iso.org/standards.html
- IEEE — Standards and Floating-Point (IEEE 754 background) — https://standards.ieee.org/standard/754-2019.html
- OSHA — General Guidance on Recordkeeping and Traceability — https://www.osha.gov
- SEC — Securities and Exchange Commission Yield Calculation Guidance — https://www.sec.gov/rules/proposed/482.txt
- FINRA — Fixed Income and Bonds — https://www.finra.org/investors/investing/investment-products/bonds
- U.S. Treasury — Treasury Securities — https://www.treasurydirect.gov/marketable-securities/
Further resources
Versioning & Change Control
Audit record (versions, QA runs, reviewer sign-off, and evidence).
Record ID: 5e8d08fe2d7cWhat changed (latest)
v1.0.0 • 2025-11-03 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Public QA status
PASS — golden 25 + edge 120
Last run: 2026-01-23 • Run: golden-edge-2026-01-23
Versioning & Change Control
Audit record (versions, QA runs, reviewer sign-off, and evidence).
What changed (latest)
v1.0.0 • 2025-11-03 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Public QA status
PASS — golden 25 + edge 120
Last run: 2026-01-23 • Run: golden-edge-2026-01-23
Engine
v1.0.0
Data
Baseline (no external datasets)
Content
v1.0.0
UI
v1.0.0
Governance
Last updated: Nov 3, 2025
Reviewed by: Fidamen Standards Committee (Review board)
Credentials: Internal QA
Risk level: low
Reviewer profile (entity)
Fidamen Standards Committee
Review board
Internal QA
Entity ID: https://fidamen.com/reviewers/fidamen-standards-committee#person
Semantic versioning
- MAJOR: Calculation outputs can change for the same inputs (formula, rounding policy, assumptions).
- MINOR: New features or fields that do not change existing outputs for the same inputs.
- PATCH: Bug fixes, copy edits, or accessibility changes that do not change intended outputs except for previously incorrect cases.
Review protocol
- Verify formulas and unit definitions against primary standards or datasets.
- Run golden-case regression suite and edge-case suite.
- Record reviewer sign-off with credentials and scope.
- Document assumptions, limitations, and jurisdiction applicability.
Assumptions & limitations
- Uses exact unit definitions from the Fidamen conversion library.
- Internal calculations use double precision; display rounding follows the unit's configured decimal places.
- Not a substitute for calibrated instruments in regulated contexts.
- Jurisdiction-specific rules may require official guidance.
Change log
v1.0.0 • 2025-11-03 • MINOR
Initial publication and governance baseline.
Why: Published with reviewed formulas, unit definitions, and UX controls.
Areas: engine, content, ui • Reviewer: Fidamen Standards Committee • Entry ID: 203caafe9c88
- https://standards.ieee.org/standard/754-2019.html
- https://www.finra.org/investors/investing/investment-products/bonds
- https://www.iso.org/standards.html
- https://www.nist.gov/topics/risk-management
- https://www.osha.gov
- https://www.sec.gov/rules/proposed/482.txt
- https://www.treasurydirect.gov/marketable-securities/
